public static SPGroup GetParticipants(SPWeb caseWeb) { SPGroup participantsGroup = null; if (!caseWeb.TryGetGroup(ParticipantsName(caseWeb.Name), out participantsGroup)) { string description = string.Format("Investigators of the {0} Case Site", caseWeb.Name); participantsGroup = caseWeb.CreateGroup(ParticipantsName(caseWeb.Name), description, GetOwners(caseWeb) as SPMember); } return(participantsGroup); }
public static SPGroup GetExternalUsers(SPWeb caseWeb) { SPGroup externalPartyGroup = null; if (!caseWeb.TryGetGroup(ShareWithExternalUsers(caseWeb.Name), out externalPartyGroup)) { string description = string.Format("External Parties of the {0} Case Site", caseWeb.Name); externalPartyGroup = caseWeb.CreateGroup(ShareWithExternalUsers(caseWeb.Name), description, GetOwners(caseWeb) as SPMember); } return(externalPartyGroup); }
public static SPGroup GetOwners(SPWeb caseWeb) { SPGroup ownersGroup = null; if (!caseWeb.TryGetGroup(OwnersName(caseWeb.Name), out ownersGroup)) { string description = string.Format("Bureaus of the {0} Case Site", caseWeb.Name); ownersGroup = caseWeb.CreateGroup(OwnersName(caseWeb.Name), description, caseWeb.Site.RootWeb.AssociatedOwnerGroup as SPMember); } return(ownersGroup); }