[Zope-CMF] CMFLDAP + users' list & local Roles

Jens Vagelpohl jens@zope.com
Mon, 11 Mar 2002 14:09:04 +0100


i'm not sure i fully understand your question, but if you are trying to 
find out "give me all users with role XYZ" then you cannot do that with 
any user folder that i am aware of, especially when local roles are 
involved. neither the user folder nor the user objects are aware of local 
roles.

if you have a local role XYZ and you want all users with that local role 
the only way is to ask the user folder for all users (look up "getUsers" 
in the user folder API documentation) and then call the "getRolesInContext"
  method on every single one. this one is explained in the help system API 
docs for the authenticated user. that way you have all roles, including 
local roles, for the users defined in the user folder. then you would have 
to manually filter out those users that you are interested in.

jens



On Monday, March 11, 2002, at 01:28 , Cravoisier Thierry wrote:

> Hi all,
>
> I use CMFLDAP authentication and would like to get some important
> information. Note that the groups are defined in the LDAPUserFolder
> (locally on the Zope server) for me to manage the various user's roles.
>
> - How do I get the complete list of defined users and their associated
> roles ? When trying to get this information, I always need to go the
> "Users" tab of the CMF ACL Users folder and enter the name of the user
> to see his own characteristics. But the roles are defined locally and I
> would like to know by roles which user has already been declared.
>
> Did anyone already solve this problem ?
>
> Thanks
> Thierry
>