On Mon, May 2, 2011 at 01:00, Sergiu Dumitriu <[email protected]> wrote:
I needed something to represent users and groups in the new rights management implementation, so I just committed a different proposal for users and user management.
My implementation is centered on individual users, not on their management, so I removed the count and retrieve all users methods.
So, the core is the User interface, which represents an (abstract) user. IMO, this interface allows to have users coming from different authentication systems, not just wiki users with a profile object in a document. There are two methods to get to the underlying entity, getProfileDocument and getProfileURI, both optional. It has a generic getAttribute method, which allows to retrieve all/any information associated with a user, with no other metadata important enough to have its own method, except the user full name, which I considered to be one of the identifiers, not metadata.
The UserManager allows, for the moment, just to retrieve a user from an identifier.
The default user manager is actually a meta manager, which asks other UserManager implementations to resolve an identifier into a proper user object, allowing to have a mix of users coming from different sources in the wiki.
I kept in the implementation a way to achieve what JV needed in the first place, a way to force users to be defined in local wikis, or only in the global wiki, or just in a specific wiki (for example, all users are to be defined in the "users" wiki, so they are global, but they can't accidentally get Programming Rights).
I added a few remarks and questions on the commit (comments welcome) at https://github.com/xwiki/xwiki-platform/commit/34a0f83c354ac68eca75c7141133f...
Commented on the commit (github is great :)).
Note that this is just a PoC, waiting for validation that it's the right approach.
I have something similar in mind for Groups as well, but I'd like to keep groups and users separate (two different modules), with no connection from users to groups, only the other way around.
+1
On 08/04/2010 11:30 AM, Jean-Vincent Drean wrote:
Hi Devs,
I'd like to introduce a new configuration property that would define at which level users should be handled in a farm. See the proposition about the new entry in xwiki.properties, it should be self-explanatory:
--------------------------------8<-------------------------------- #-# [Since 2.5M1] #-# Define at which level users and groups should be handled in the farm. Available modes: #-# #-# mixed (default): #-# - user registration available in the main wiki and local wikis #-# - users from the current wiki and the main wiki will be displayed in the rights interface and user suggests #-# - user administration is present in all the wikis #-# #-# local: #-# - user registration available in the main wiki and local wikis #-# - only users from the current wiki will be displayed in the rights interface and user suggests #-# - user administration is present in all the wikis #-# #-# global: #-# - user registration available in the main wiki only, the register link in local wikis will point to the main wiki #-# - only users from the main wiki will be displayed in the rights interface and user suggests #-# - user administration is present in the main wiki only core.virtual.users=mixed -------------------------------->8--------------------------------
More details are available here: http://dev.xwiki.org/xwiki/bin/view/Design/UsersModule
WDYT ?
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne