Hi Lars, OK, I guess this sort of makes sense, but to which administration unit should an administrator "belong" to? The "topmost" orgunit?
I suppose it might make sense to delete a user entirely , which what happens if you want to see who last modified a data value, but the user has been deleted? Isn't it best to "deactivate" them (which does seem possible) and/or deassign them from all orgunits (which also does not seem possible)? The bug can be reproduced by "TRUNCATE usermembership" of less drastic means, such as deleting all orgunit associations of a particular user from the "usermembership" object. In this case, I am sure it was a result of truncation of the "usermembership" table, which I needed to populate though an external Excel file which provided the orgunit/user associations, and was transformed to SQL . However, some users were not associated with any orgunits (yet) and other users did not make sense to associate with any orgunits (such as administrators). I suppose I need to either remove these users, or assign them "some" orgunit, although they do not really have any at the moment. I guess the "root orgunit" property should really be an attribute of the user and should be set to NOT NULL? What are the implications if a user is associated with multiple facilities (lowest orgunit level) which exist in multiple districts but has no true "root"? Thanks, Jason 2011/8/26 Lars Helge Øverland <[email protected]>: > Hi Jason > > On Thu, Aug 25, 2011 at 10:15 AM, Jason Pickering > <[email protected]> wrote: >> Hi Devs, >> I am having a hard time understanding why I cannot unassign all >> organisational units for a given user through the Users->Users by >> organisation unit-> Edit button (Under a specific user). >> >> I want to unassign all organisational units for a given user, but >> leave the user active in the system. I get a message (This field is >> required) when I hit "Unselect all" from the organisational unit tree >> towards the bottom of the screen. I would expect that it should be >> possible to delete all associations between users and orgunits. >> > > This is a good question, the reason is that people often forget to > assign users to organisation units if it is not enforced through > validation. The user needs to have one or more orgunits for the system > to work properly in several situations: i) dynamic generation of > charts based on the current user's orgunit ii) what root in orgunit > tree to choose when logging in iii) the mobile facility reporting > needs to know for which orgunit to save data afaik, and so on. So we > decided to enforce this, I guess we haven't considered the situation > where you want to inactivate a user. > > What does it imply to deactivate a user? Should she not be able to log in? > >> Another (big issue) which I have noticed is that for users who do not >> have any organisational units assigned to them, they get ALL >> organisational units which have a particular dataset enabled. This is >> a huge issue for us here in Nigeria, as there are some users in the >> system who currently do not have any orgunits assigned to them (but >> will in the future) but should not be able to enter data into orgunits >> to which they not have been explicitly assigned. >> > > OK the intended behavior is to display nothing in the orgunit tree > when user has no org units. A bit hard to reproduce this bug. Can you > pls double check the usermembership table for any associations for > this user, and clear the system (Hibernate) cache (guess you have > already done this though). > > > Lars > _______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : [email protected] Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp

