Adds a role assignment to the collection of role assignment objects at the current scope.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
'Declaration Public Sub AddToCurrentScopeOnly ( _ roleAssignment As SPRoleAssignment _ ) 'Usage Dim instance As SPRoleAssignmentCollection Dim roleAssignment As SPRoleAssignment instance.AddToCurrentScopeOnly(roleAssignment)
public void AddToCurrentScopeOnly( SPRoleAssignment roleAssignment )
The role assignment to add.
This method does not propagate the security principal in the Member property of the SPRoleAssignment object to the SPRoleType.Guest role of the parent scopes. If you do want to ensure that the security principal has at least limited access to objects in parent scopes, then you should call the Add(SPPrincipal) method.
When you call the SPRoleAssignmentCollection.Remove method, the remove operation affects the current scope and all sub scopes regardless of whether the SPRoleAssignmentCollection.AddToCurrentScopeOnly method is used to create any of the scopes.