I'm trying to store ACL permissions to LDAP. I have permission for users and for groups (user belongs to many groups). Here is structure i create:
ou=Groups
cn=Admin [posixGroup] {memberUid=andrew, memberUid=johny}
cn=Right {resource:ftp1, action:all}
cn=Right {resource:ftp2, action:all}
cn=Editor [posixGroup] {memberUid=joseph}
cn=Right {resource:ftp1, action:list}
ou=People
cn=andrew {uid=andrew}
cn=Right {resource:ftp3, action:all}
cn=johny {uid=johny}
cn=joseph {uid=joseph}
there are attributes in brackets {}. Well, in time when andrew connects to ftp3, i'd like to check permissions so i query:
(|(memberUid=andrew)(uid=andrew))
but i get only parent elements of cn=Rights : cn=andrew and cn=Admin. Is it possible to write query to return cn=Right elements using filter by memberUid uid elements defined in parents? Or structure has to be changed some way. Thank you very much, for your time. Andrew