Users Module

Version 9.1 by Jean-Vincent Drean on 2010/08/03 13:37

The need is to develop the Users module of the XWiki platform, i.e. the module that provides the APIs allowing to manage XWiki Users.

Requirements & Use cases

We display lists of users in multiple places: user administration, user directory (to be commited), user suggests, rights UI.

  • UC1: Being able to restrict the list of users to local users in a wiki instance
  • UC2: Being able to restrict the list of users to global users in a wiki instance
  • UC2: Being able to mix local and global users in the lists available in a wiki instance

Implementation Proposal

Configuration (xwiki.properties)

 

#-# [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
#-# - user administration is present in all the wikis
#-# - user input suggests will look into the current wiki and the main wiki
#-#
#-# local:
#-# - user registration available in the main wiki and local wikis
#-# - only users from the current wiki will be displayed in the rights interface
#-# - user administration is present in all the wikis
#-# - user input suggests will look into the current wiki only
#-#
#-# 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
#-# - user administration is present in the main wiki only
#-# - user input suggests will look into the global wiki only
core.virtual.users=mixed

Users Component

Hierarchy:

|- xwiki-users/
|-- xwiki-users-api/
|-- xwiki-users-default/ : some standard implementations
           * default (proxy that determine the implementation to use from the configuration)
           * global (only global users)
           * local (only local users)
           * mixed (both global and local users)

Minimalistic UserManager API (starting point meant to be extended in the future):

public interface UserManager 
{
    List<DocumentReference> getUsers(int number, int offset);
    List<DocumentReference> getUsers(String match, int number, int offset);
}

Get Connected