Interface ISecurableObject
- Namespace
- PnP.Core.Model.SharePoint
- Assembly
- PnP.Core.dll
Defines the properties and methods for securable object (Web, List, ListItem)
public interface ISecurableObject
Properties
HasUniqueRoleAssignments
Returns if the securable object has unique role assignments
bool HasUniqueRoleAssignments { get; }
Property Value
RoleAssignments
Role Assignments defined on this securable object
Implements IQueryable<T>.
See Requesting model collections
and IQueryable performance considerations to learn more.
IRoleAssignmentCollection RoleAssignments { get; }
Property Value
Methods
AddRoleDefinition(int, IRoleDefinition)
Add role definitions for a specific principal id (IUser.Id or ISharePointGroup.Id)
void AddRoleDefinition(int principalId, IRoleDefinition roleDefinition)
Parameters
principalIdintroleDefinitionIRoleDefinitionRole definition to add
AddRoleDefinitionAsync(int, IRoleDefinition)
Adds role definitions for a specific principal id (IUser.Id or ISharePointGroup.Id)
Task AddRoleDefinitionAsync(int principalId, IRoleDefinition roleDefinition)
Parameters
principalIdintroleDefinitionIRoleDefinitionRole definition to add
Returns
AddRoleDefinitionBatch(Batch, int, IRoleDefinition)
Add role definitions for a specific principal id (IUser.Id or ISharePointGroup.Id)
void AddRoleDefinitionBatch(Batch batch, int principalId, IRoleDefinition roleDefinition)
Parameters
batchBatchThe batch to add this request to
principalIdintroleDefinitionIRoleDefinitionRole definition to add
AddRoleDefinitionBatch(int, IRoleDefinition)
Add role definitions for a specific principal id (IUser.Id or ISharePointGroup.Id)
void AddRoleDefinitionBatch(int principalId, IRoleDefinition roleDefinition)
Parameters
principalIdintroleDefinitionIRoleDefinitionRole definition to add
AddRoleDefinitionBatchAsync(Batch, int, IRoleDefinition)
Adds role definitions for a specific principal id (IUser.Id or ISharePointGroup.Id)
Task AddRoleDefinitionBatchAsync(Batch batch, int principalId, IRoleDefinition roleDefinition)
Parameters
batchBatchThe batch to add this request to
principalIdintroleDefinitionIRoleDefinitionRole definition to add
Returns
AddRoleDefinitionBatchAsync(int, IRoleDefinition)
Adds role definitions for a specific principal id (IUser.Id or ISharePointGroup.Id)
Task AddRoleDefinitionBatchAsync(int principalId, IRoleDefinition roleDefinition)
Parameters
principalIdintroleDefinitionIRoleDefinitionRole definition to add
Returns
AddRoleDefinitions(int, params string[])
Adds roles for a specific principal id (IUser.Id or ISharePointGroup.Id)
bool AddRoleDefinitions(int principalId, params string[] names)
Parameters
Returns
AddRoleDefinitionsAsync(int, params string[])
Adds roles for a specific principal id (IUser.Id or ISharePointGroup.Id)
Task<bool> AddRoleDefinitionsAsync(int principalId, params string[] names)
Parameters
Returns
BreakRoleInheritance(bool, bool)
Creates unique role assignments for this securable object.
void BreakRoleInheritance(bool copyRoleAssignments, bool clearSubscopes)
Parameters
copyRoleAssignmentsboolSpecifies whether to copy the role assignments from the parent securable object. If the value is false, the collection of role assignments must contain only 1 role assignment containing the current user after the operation.
clearSubscopesboolIf the securable object is a site, and the clearsubscopes parameter is true, the role assignments for all child securable objects in the current site and in the sites which inherit role assignments from the current site must be cleared and those securable objects will inherit role assignments from the current site after this call. If the securable object is a site, and the clearsubscopes parameter is false, the role assignments for all child securable objects which do not inherit role assignments from their parent object must remain unchanged. If the securable object is not a site, and the clearsubscopes parameter is true, the role assignments for all child securable objects must be cleared and those securable objects will inherit role assignments from the current securable object after this call. If the securable object is not a site, and the clearsubscopes parameter is false, the role assignments for all child securable objects which do not inherit role assignments from their parent object must remain unchanged.
BreakRoleInheritanceAsync(bool, bool)
Creates unique role assignments for this securable object.
Task BreakRoleInheritanceAsync(bool copyRoleAssignments, bool clearSubscopes)
Parameters
copyRoleAssignmentsboolSpecifies whether to copy the role assignments from the parent securable object. If the value is false, the collection of role assignments must contain only 1 role assignment containing the current user after the operation.
clearSubscopesboolIf the securable object is a site, and the clearsubscopes parameter is true, the role assignments for all child securable objects in the current site and in the sites which inherit role assignments from the current site must be cleared and those securable objects will inherit role assignments from the current site after this call. If the securable object is a site, and the clearsubscopes parameter is false, the role assignments for all child securable objects which do not inherit role assignments from their parent object must remain unchanged. If the securable object is not a site, and the clearsubscopes parameter is true, the role assignments for all child securable objects must be cleared and those securable objects will inherit role assignments from the current securable object after this call. If the securable object is not a site, and the clearsubscopes parameter is false, the role assignments for all child securable objects which do not inherit role assignments from their parent object must remain unchanged.
Returns
BreakRoleInheritanceBatch(Batch, bool, bool)
Creates unique role assignments for this securable object.
void BreakRoleInheritanceBatch(Batch batch, bool copyRoleAssignments, bool clearSubscopes)
Parameters
batchBatchBatch add this request to
copyRoleAssignmentsboolSpecifies whether to copy the role assignments from the parent securable object. If the value is false, the collection of role assignments must contain only 1 role assignment containing the current user after the operation.
clearSubscopesboolIf the securable object is a site, and the clearsubscopes parameter is true, the role assignments for all child securable objects in the current site and in the sites which inherit role assignments from the current site must be cleared and those securable objects will inherit role assignments from the current site after this call. If the securable object is a site, and the clearsubscopes parameter is false, the role assignments for all child securable objects which do not inherit role assignments from their parent object must remain unchanged. If the securable object is not a site, and the clearsubscopes parameter is true, the role assignments for all child securable objects must be cleared and those securable objects will inherit role assignments from the current securable object after this call. If the securable object is not a site, and the clearsubscopes parameter is false, the role assignments for all child securable objects which do not inherit role assignments from their parent object must remain unchanged.
BreakRoleInheritanceBatch(bool, bool)
Creates unique role assignments for this securable object.
void BreakRoleInheritanceBatch(bool copyRoleAssignments, bool clearSubscopes)
Parameters
copyRoleAssignmentsboolSpecifies whether to copy the role assignments from the parent securable object. If the value is false, the collection of role assignments must contain only 1 role assignment containing the current user after the operation.
clearSubscopesboolIf the securable object is a site, and the clearsubscopes parameter is true, the role assignments for all child securable objects in the current site and in the sites which inherit role assignments from the current site must be cleared and those securable objects will inherit role assignments from the current site after this call. If the securable object is a site, and the clearsubscopes parameter is false, the role assignments for all child securable objects which do not inherit role assignments from their parent object must remain unchanged. If the securable object is not a site, and the clearsubscopes parameter is true, the role assignments for all child securable objects must be cleared and those securable objects will inherit role assignments from the current securable object after this call. If the securable object is not a site, and the clearsubscopes parameter is false, the role assignments for all child securable objects which do not inherit role assignments from their parent object must remain unchanged.
BreakRoleInheritanceBatchAsync(Batch, bool, bool)
Creates unique role assignments for this securable object.
Task BreakRoleInheritanceBatchAsync(Batch batch, bool copyRoleAssignments, bool clearSubscopes)
Parameters
batchBatchBatch add this request to
copyRoleAssignmentsboolSpecifies whether to copy the role assignments from the parent securable object. If the value is false, the collection of role assignments must contain only 1 role assignment containing the current user after the operation.
clearSubscopesboolIf the securable object is a site, and the clearsubscopes parameter is true, the role assignments for all child securable objects in the current site and in the sites which inherit role assignments from the current site must be cleared and those securable objects will inherit role assignments from the current site after this call. If the securable object is a site, and the clearsubscopes parameter is false, the role assignments for all child securable objects which do not inherit role assignments from their parent object must remain unchanged. If the securable object is not a site, and the clearsubscopes parameter is true, the role assignments for all child securable objects must be cleared and those securable objects will inherit role assignments from the current securable object after this call. If the securable object is not a site, and the clearsubscopes parameter is false, the role assignments for all child securable objects which do not inherit role assignments from their parent object must remain unchanged.
Returns
BreakRoleInheritanceBatchAsync(bool, bool)
Creates unique role assignments for this securable object.
Task BreakRoleInheritanceBatchAsync(bool copyRoleAssignments, bool clearSubscopes)
Parameters
copyRoleAssignmentsboolSpecifies whether to copy the role assignments from the parent securable object. If the value is false, the collection of role assignments must contain only 1 role assignment containing the current user after the operation.
clearSubscopesboolIf the securable object is a site, and the clearsubscopes parameter is true, the role assignments for all child securable objects in the current site and in the sites which inherit role assignments from the current site must be cleared and those securable objects will inherit role assignments from the current site after this call. If the securable object is a site, and the clearsubscopes parameter is false, the role assignments for all child securable objects which do not inherit role assignments from their parent object must remain unchanged. If the securable object is not a site, and the clearsubscopes parameter is true, the role assignments for all child securable objects must be cleared and those securable objects will inherit role assignments from the current securable object after this call. If the securable object is not a site, and the clearsubscopes parameter is false, the role assignments for all child securable objects which do not inherit role assignments from their parent object must remain unchanged.
Returns
GetRoleDefinitions(int)
Returns the roles for a specific principal id (IUser.Id or ISharePointGroup.Id)
IRoleDefinitionCollection GetRoleDefinitions(int principalId)
Parameters
principalIdintId of the user or group
Returns
GetRoleDefinitionsAsync(int)
Returns the roles for a specific principal id (IUser.Id or ISharePointGroup.Id)
Task<IRoleDefinitionCollection> GetRoleDefinitionsAsync(int principalId)
Parameters
principalIdintId of the user or group
Returns
RemoveRoleDefinition(int, IRoleDefinition)
Removes role definitions for a specific principal id (IUser.Id or ISharePointGroup.Id)
void RemoveRoleDefinition(int principalId, IRoleDefinition roleDefinition)
Parameters
principalIdintroleDefinitionIRoleDefinitionRole definition to remove
RemoveRoleDefinitionAsync(int, IRoleDefinition)
Removes role definitions for a specific principal id (IUser.Id or ISharePointGroup.Id)
Task RemoveRoleDefinitionAsync(int principalId, IRoleDefinition roleDefinition)
Parameters
principalIdintroleDefinitionIRoleDefinitionRole definition to remove
Returns
RemoveRoleDefinitionBatch(Batch, int, IRoleDefinition)
Removes role definitions for a specific principal id (IUser.Id or ISharePointGroup.Id)
void RemoveRoleDefinitionBatch(Batch batch, int principalId, IRoleDefinition roleDefinition)
Parameters
batchBatchThe batch to add this request to
principalIdintroleDefinitionIRoleDefinitionRole definition to remove
RemoveRoleDefinitionBatch(int, IRoleDefinition)
Removes role definitions for a specific principal id (IUser.Id or ISharePointGroup.Id)
void RemoveRoleDefinitionBatch(int principalId, IRoleDefinition roleDefinition)
Parameters
principalIdintroleDefinitionIRoleDefinitionRole definition to remove
RemoveRoleDefinitionBatchAsync(Batch, int, IRoleDefinition)
Removes role definitions for a specific principal id (IUser.Id or ISharePointGroup.Id)
Task RemoveRoleDefinitionBatchAsync(Batch batch, int principalId, IRoleDefinition roleDefinition)
Parameters
batchBatchThe batch to add this request to
principalIdintroleDefinitionIRoleDefinitionRole definition to remove
Returns
RemoveRoleDefinitionBatchAsync(int, IRoleDefinition)
Removes role definitions for a specific principal id (IUser.Id or ISharePointGroup.Id)
Task RemoveRoleDefinitionBatchAsync(int principalId, IRoleDefinition roleDefinition)
Parameters
principalIdintroleDefinitionIRoleDefinitionRole definition to remove
Returns
RemoveRoleDefinitions(int, params string[])
Removes roles for a specific principal id (IUser.Id or ISharePointGroup.Id)
bool RemoveRoleDefinitions(int principalId, params string[] names)
Parameters
Returns
RemoveRoleDefinitionsAsync(int, params string[])
Removes role for a specific principal id (IUser.Id or ISharePointGroup.Id)
Task<bool> RemoveRoleDefinitionsAsync(int principalId, params string[] names)
Parameters
Returns
ResetRoleInheritance()
Removes the local role assignments so that the web, and all its descendant objects, re-inherit role assignments from the parent object.
void ResetRoleInheritance()
ResetRoleInheritanceAsync()
Removes the local role assignments so that the web, and all its descendant objects, re-inherit role assignments from the parent object.
Task ResetRoleInheritanceAsync()
Returns
ResetRoleInheritanceBatch()
Removes the local role assignments so that the web, and all its descendant objects, re-inherit role assignments from the parent object.
void ResetRoleInheritanceBatch()
ResetRoleInheritanceBatch(Batch)
Removes the local role assignments so that the web, and all its descendant objects, re-inherit role assignments from the parent object.
void ResetRoleInheritanceBatch(Batch batch)
Parameters
batchBatchThe batch to add this request to
ResetRoleInheritanceBatchAsync()
Removes the local role assignments so that the web, and all its descendant objects, re-inherit role assignments from the parent object.
Task ResetRoleInheritanceBatchAsync()
Returns
ResetRoleInheritanceBatchAsync(Batch)
Removes the local role assignments so that the web, and all its descendant objects, re-inherit role assignments from the parent object.
Task ResetRoleInheritanceBatchAsync(Batch batch)
Parameters
batchBatchThe batch to add this request to