6

I wrote an event system module which needs to find out if the current user has access to a certain folder. It does this by examining the GroupMemberships of the user and comparing those to the ACE (AccessControlEntry) of the folder.

It works fine in dev, where we have LDAP users which we manually assign to a group in Tridion. However, in the other environments here, we use group sync to manage the memberships. In this case, the user is not a member of the group at all, so my logic doesn't work.

I'm guessing the only way out of this is to retrieve a list of users of a directory service group. How can I do that?

I've seen this answer: How do I obtain a list of the members of a Tridion group which is mapped to an Active directory group using Core Services?. But that uses Core Service, and I need to do this from the event system, so with Tom.NET. There doesn't seem to be an equivalent of GetListDirectoryServiceGroupMembers in Tom.NET.

2

Looking at the API, there's no obvious way to just ask TOM.NET for a list.

However, from a group you can get its claim mappings, which in this case will be instances of DirectoryGroupMapping. From the various properties of this class, you can construct an ADSI correct query, and then use System.DirectoryServices to execute it and retrieve the results.

Even if TOM.NET had such a list, under the water, it would be making pretty much the same query, anyway. That's the logic of managing your memberships externally.

  • I looked again at the API. I've updated the answer to reflect this. – Dominic Cronin Aug 4 '14 at 7:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.