My list called "WorkFlowTempDocLib" has Read permission for group called
siteGroupNamePublisher="Publisher";
SPList yourList = site.Lists["WorkFlowTempDocLib"];
SPGroup secGroupCertifier = site.SiteGroups[siteGroupNameCertifier];
yourList.BreakRoleInheritance(true);
SPRoleAssignment roleAssignment3 = new SPRoleAssignment(secGroupCertifier);
SPRoleDefinition roleDefinition3 = site.RoleDefinitions.GetByType(SPRoleType.Contributor);
roleAssignment3.RoleDefinitionBindings.Add(roleDefinition3);
yourList.RoleAssignments.Add(roleAssignment3);
yourList.Update();
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment