[pmwiki-users] AuthUser - ldap - how to define custom groups

Patrick R. Michaud pmichaud at pobox.com
Thu Feb 8 11:49:05 CST 2007


On Thu, Feb 08, 2007 at 06:18:25PM +0100, Thomas Gemperli wrote:
> Because I want to use existing ldap groups to assign edit rights I've  
> wrote a small piece of php code to get out group-memberships from our  
> LDAP. Well, this works also. config.php snippet:
> 
> $AuthUser['ldap'] = "$ldaphost/$ldapuserdn,$ldapdn?$ldapuserprefix";
> include_once("$FarmD/scripts/authuser.php");
> 
> $AuthUser['@editors'] = array(get_ldap_values("cn=groups",  
> "(cn=aldapgroup)", array("memberUid")));
> ...
> Obviously the following statement in config.php does not work:
> $AuthUser['@othereditors'] = array(get_ldap_values("cn=groups",  
> "(cn=anotherldapgroup)", array("memberUid")));

What doesn't the @othereditors line work?  If it works for @editors,
it should work for @othereditors as well.

One thing I will note is that any settings to the $AuthUser array
need to be made *before* including the authuser.php script --
the snippet you give shows it happening afterwards.

Pm



More information about the pmwiki-users mailing list