Advertisement
Advertisement
| 04.24.2008 at 07:55AM PDT, ID: 23350468 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: |
// get a reference to the folder (this assumes path points to a valid folder) SPFolder folder = SharePointConfiguration.Site.GetFolder(path); // get a reference to the Sharepoint group collection SPGroupCollection spc = SharePointConfiguration.Site.SiteGroups; // get a reference to the group whos permissions you want to modify for the folder above SPGroup group = spc[groupName]; // create a role assignment from the group reference SPRoleAssignment roleAssignment = new SPRoleAssignment((SPPrincipal)group); // break role inheritance for folders/files because they will be having permissions separate from their parent file/folder folder.Item.BreakRoleInheritance(true); // update the role assignments for the group by adding the permissionSet TestPermissionLevel which is a custom // permissionset I created manually&you can easily use any of the built-in permission sets roleAssignment.RoleDefinitionBindings.Add(SharePointConfiguration.Site.RoleDefinitions["Test Permission Level"]); // apply the new roleassignment to the folder. You can do this at the listitem level if desired (i.e. this could be SPfile.Item&. instead of SPFolder.Item) folder.Item.RoleAssignments.Add(roleAssignment); |