The concept is pretty simple. You have users who you want to assign unique permissions on your web site. You create a RoleDefinition where you specify the unique permissions that make up the role that you want to create [say you were defining the contribute role], and also give a unique name for the role definition.
Then you'd create a RoleAssignment object. This is a object that takes in
Then you'd create a RoleAssignment object. This is a object that takes in
- The user that you want to associate with the RoleDefinition above
- In the RoleDefinitionBindings collection, you add one or more RoleDefinitions that you want to associate with the user - like Reader, Contributor etc. This is where you would add in the new RoleDefinition object that you created above.
- Add this RoleAssignment object to the collection obtained from SPWeb.RoleAssignments
No comments:
Post a Comment