SPRoleAssignmentCollection.AddToCurrentScopeOnly Method
SharePoint 2010
Adds a role assignment to the collection of role assignment objects at the current scope.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Parameters
- roleAssignment
- Type: Microsoft.SharePoint.SPRoleAssignment
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.
Note
|
|---|
|
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. |
How to add group with Limited Access permission?
Document related to FGP (http://www.microsoft.com/download/en/details.aspx?id=9030) says: When users are added to individual scopes under the Web level, using the new SharePoint 2010 Products SPRoleAssignmentCollection.AddToCurrentScopeOnly method, they can also then be added, by additional code, to the new group that has already been established as having Limited Access rights at the Web and document library level.
How to add group with Limited Access rights? Create your own permission level (My Limited Access). Detailed description can be found here: http://www.martinhatch.com/2011/10/scaling-to-10000-unique-permissions_04.html
How to add group with Limited Access rights? Create your own permission level (My Limited Access). Detailed description can be found here: http://www.martinhatch.com/2011/10/scaling-to-10000-unique-permissions_04.html
- 10/6/2011
- Smartin75
SPRoleAssignmentCollection.Remove operation and how it affects scope
Note that 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.
scope and all sub scopes regardless of whether the SPRoleAssignmentCollection.AddToCurrentScopeOnly
method is used to create any of the scopes.
- 7/26/2011
- Siew Moi Khor - MSFT
Note