0

I have a Sharepoint farm with many SPGroups for employees and many other groups for managers.

Eg. EmployeesLocal, EmployeesInternational, ManagersTechnical, ManagersHR etc.

I want to check if a user belongs to an employees group but I don't want the overhead of checking against each group as this will be a maintenance headache. Is there a way to add a custom field or property to the SPGroup class and then set it to "Employees" for all the employee groups and similarly for managers.

Also, if there is a way to create a hierarchy of SPGroups then I could add a parent Employee group and other groups under it. But I believe this is not possible. I would appreciate if someone can confirm this.

How would one go about solving such a problem.

1 Answer 1

2

Unfortunately, you can neither extend groups (SPGroup) nor create hierarchies of SharePoint groups. You can achieve something similar via a custom SharePoint list, adding your metadata as columns to the list, store the reference to the SharePoint group in a Person or Group field, and create hierarchies via a lookup field referencing other 'group' items from the same custom list.

1
  • Hmm.. I would imagine SharePoint to have some way of doing this natively. But thats a good workaround for the moment. Thanks. Feb 24, 2015 at 10:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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