Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

In an application I'm building, I have to create and manage groups based on business rules. Each group must have properties like managers (yes, several managers) and members, with some other properties. Security will be applied to theses groups, and other list can have group selector in their columns.

How should I implement such feature ?

As I have to apply security based on these groups, I have to create SPGroups

As I have to add extra metadata to the groups, I cannot use SPGroup.

The only way I see is to define a custom list, with receivers that will synchronize my list data with a SPGroup.

Is there any better solution ?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Since I done similar thing recently I think this is simplest solution.

Custom list with two user fields: one for managers and other for members. Simple receiver can be developed that creates/updates/deletes groups based on list item user field values. In my case I used one group for managers and one for members. List item can contain additional group 'metadata'.

One tip: when creating new group it is good choice to write back group id to list item containing 'metadata'. When updating/deleting group you can use this id to find desired group. Getting SPGroups by name is IMHO not safe because group names can be changed manually but group ids are 'static'.

share|improve this answer
    
good tip. I'll follow it –  Steve B Jun 14 '12 at 8:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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