So, I am attempting to write some LDAP rules that will allow certain people the ability to write some subtrees.
Let's say we have this user:
dn: uid=minion1,o=mycompany,ou=cust,dc=some,dc=domain
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
isAdmin: TRUE
And this user:
dn: uid=minion2,o=mycompany,ou=cust,dc=some,dc=domain
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
isAdmin: FALSE
Oh, and this user:
dn: uid=minion3,o=notmycompany,ou=cust,dc=some,dc=domain
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
isAdmin: FALSE
I'm attempting to set permissions for minion1 to modify minion2's account, but not minion3 (if you look, minion3 is in a different organization "notmycompany" where the other two are in "mycompany").
The basic rule is that a user should have the ability to add/modify/delete entries in its organization based on if the "isAdmin" property set to TRUE, AND if the object is in the same organization as the user he/she wishes to modify.
My partially working ACL is:
to dn.regex="^.+o=([^,]+),ou=cust,dc=some,dc=domain$"
by set="user/isAdmin & [TRUE]" write
This will of course allow them to modify minion3's account as well. I would like to add
"[^.+,o=$1,ou=cust,dc=some,dc=domain$]"
to the by line above, but so far I have failed miserably. Does anyone have any good ideas I might try? (Did I explain what I'm attempting to do here adequately)?
Thanks in advance;