Forums / Setup & design / one user is in vacation or sick and another user should take over his work...

one user is in vacation or sick and another user should take over his work...

Author Message

Thomas Nunninger

Saturday 17 April 2004 2:38:03 am

Hey,

in our project we have the requirement, that - if one user (User A) is in vacation, sick, ... - there should be the possibility that another user (User B) can take over his work.

First I thougth that I only need to put User B to the same groups User A is member of (or sometihing like that - can a user be member of more then one user group like content can be published at different nodes?) Now User B has almost the same rights like User A

But that's not enough: User A is owner of some objects only he can access: perhaps he has an article, only he can update, or much more important: User A has some customers or setup some notifications in the system. I think it would be hard to give those rights to User A.

* What is possible without to much work? What is not really possible?

* Does it help to create a user group for each user, and - in times of vacation - a second user becomes member of this group, too? But I think I have the same problem with for example notifications...

* Would it be possible to simply extend eZ publish in the way that a user has not only his ID but also the IDs of one or more users. Would this be a central point in the code (user module?) to change, that User B not only has his rights but also the rights of User A, so that for example he can see his notifications and those from User A in one List, or another example he can see his collaboration objects and those of User A? Or could this only be defined in the templates' logic?

(Hard to explain in english; hope it's not to confusing :) Any idea?

Thank you and have a nice day

Thomas

Gunnstein Lye

Monday 19 April 2004 7:46:02 am

A user can be placed in as many groups as you want. He/she will get all the roles assigned to all the groups.

If you have role policies based on object ownership, then it will be very hard to transfer the rights. A user group for each user would help, but will be much work to maintain if you have many users. Also, you would have to change your roles to not use object ownership as access criteria.

Changing eZ publish so that a user "has" the user ID of several users would be a lot of work, and very dangerous in terms of security. Allowing user A to view user B's notification and collaboration items would also be very hard.

The easiest solution in this case is to give B's password to A when B is away.

Thomas Nunninger

Monday 19 April 2004 10:48:27 am

Hey Gunnstein,

thank you for your answer. Giving away the passwort is not a really serious solution. Even if your suggestion would be acceptable there is the problem that I always need to log in into different accounts - I would do this only once a day - not really in time...

I spent almost the whole day on this problem - trying to find out how for example the pendinglist works. Now I have an idea...:

In the file 'kernel/content/ezcontentfunctioncollection.php' the function fetchPendingList() is defined. This function calls eZPersistentObject::fetchObjectList() with the following condition for the database query:

array('creator_id' => $userID, 
      'status' => EZ_VERSION_STATUS_PENDING)

If I'm right, I just need to replace $userID with an array of the relevant user ids - that is: I need one function, searching the relevant IDs in a content class belonging to this feature.

Then I searched for 'creator_id' in the whole code finding 51 places, which I have to look at if this piece of code is relevant for such a feature. Additionally to the 'creator_ids' I need to collect the additional roles for the user - but I think this should be a thing that could be solved much more central (probably in the ezRole class...)

In the end I just need some additionaly templates in the admin interface to transfer temporary the rigths of one user to another one...

There are just some additional questions I need to test; e.g. if User B creates a new version of an object of User A: who is / should be the owner of that object?

What do you think?

Thank you and have a nice day

Thomas

Gunnstein Lye

Tuesday 20 April 2004 12:28:15 am

I know that giving away the password is not ideal, but it is safer than the alternative. Remember, if you do these changes, then it may get very difficult to upgrade eZ publish later. Also, you may get security and stability problems. It depends on how much work you are willing to do to achieve what you want, of course. Anyway, good luck.

AFAIK, owner/creator id is set on creation of an object, and is never changed.

Paul Borgermans

Tuesday 20 April 2004 1:12:08 am

Hi,

Here we have a similar situation implemented, but only for secretaries to be able "to take over" the role of certain users. This is coupled to our specific use of hierarchies and extra attributes defined for users (not applicable for you).

There is also a "super user password" functionality which can be used to login as any user (known only to the admins of course). This is all implemented in a custom login handler, so it does not interfere with future upgrades. The idea is very simple: first compare the password used to a set of predefined passwords in a dedicated ini file (store password hashes, not the bare text passwords), if it matches, the login is granted. If not it is checked the regular way (in our case against a LDAP server). It is very useful to test roles for users.

An even better way would be to implement a "login as ... " functionality in a seperate module so you can define a new policy to enable this in certain roles. Thats more work of course.

hth

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Thomas Nunninger

Tuesday 20 April 2004 1:26:03 am

Hey Paul, hey Gunnstein,

thank you for your ideas.

When we where discussing the solutions we found the problem of upgrading to. Because of that we decided not to do this.

Paul, your idea is good. We also thought about a similar way: changing the user object of the current session. This means: you log in with your own password and then you have the possibility to switch in the other user's identity. Both ways would be a more central solution than our first idea.

Thank you and have a nice day

Thomas

eZ debug

Timing: Jan 19 2025 11:35:52
Script start
Timing: Jan 19 2025 11:35:52
Module start 'content'
Timing: Jan 19 2025 11:35:53
Module end 'content'
Timing: Jan 19 2025 11:35:53
Script end

Main resources:

Total runtime1.7366 sec
Peak memory usage4,096.0000 KB
Database Queries205

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0085 589.3359180.7813
Module start 'content' 0.00851.5170 770.1172635.8750
Module end 'content' 1.52540.2111 1,405.9922345.0234
Script end 1.7365  1,751.0156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00450.2592210.0002
Check MTime0.00160.0922210.0001
Mysql Total
Database connection0.00160.089710.0016
Mysqli_queries1.637594.29402050.0080
Looping result0.00280.16052030.0000
Template Total1.696197.720.8480
Template load0.00220.125120.0011
Template processing1.693997.542220.8470
Template load and register function0.00010.006410.0001
states
state_id_array0.00110.065010.0011
state_identifier_array0.00130.073020.0006
Override
Cache load0.00190.1069540.0000
Sytem overhead
Fetch class attribute can translate value0.00270.157740.0007
Fetch class attribute name0.00210.118690.0002
XML
Image XML parsing0.00370.211840.0009
class_abstraction
Instantiating content class attribute0.00000.0013120.0000
General
dbfile0.00770.4408400.0002
String conversion0.00000.000430.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs