This topic has not yet been rated - Rate this topic

SPRoleAssignmentCollection.Add method (SPRoleAssignment)

Adds a role assignment to the collection of role assignment objects.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
public void Add(
	SPRoleAssignment roleAssignment
)

Parameters

roleAssignment
Type: Microsoft.SharePoint.SPRoleAssignment
The role assignment to add.

This method fails if the collection already contains a role assignment for the security principal specified in the Member property of roleAssignment.

This method ensures that the security principal in the Member property of roleAssignment has at least SPRoleType.Guest access to objects in all parent scopes. To limit the access of the security principal to objects only in the current scope, call the AddToCurrentScopeOnly(SPRoleAssignment) method.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.