Class SecurityDescriptor
- Namespace
- ArcanaDevelopment.adTempus.Client
- Assembly
- ArcanaDevelopment.adTempus.Client.dll
Contains the security permissions for an object.
public sealed class SecurityDescriptor
- Inheritance
-
objectSecurityDescriptor
Remarks
Use GetSecurityDescriptor() to get the SecurityDescriptor for a secured object.
Properties
CanInheritPermissions
Indicates whether this object supports security inheritance.
public bool CanInheritPermissions { get; }
Property Value
- bool
InheritPermissions
Indicates whether this object inherits permissions from its security owner.
public bool InheritPermissions { get; set; }
Property Value
- bool
InheritedPermissions
Gets a read-only collection of the permissions the object has inherited from its ancestors.
public AccessControlEntryCollection InheritedPermissions { get; }
Property Value
Permissions
Gets a list of all AccessControlEntries defined for this object.
public AccessControlEntryCollection Permissions { get; }
Property Value
Methods
AddPermissions(SecurityEntity, IList<int>, IList<int>, SecurityInheritanceOptions)
Adds the specified permissions to the existing permissions for the specified entity.
public AccessControlEntry AddPermissions(SecurityEntity entity, IList<int> grantPermissions, IList<int> denyPermissions, SecurityInheritanceOptions inheritanceOptions)
Parameters
| Name | Type | Description |
|---|---|---|
entity |
SecurityEntity | The SecurityEntity to replace permissions for. |
grantPermissions |
IList<int> | The permissions to grant. Can be null if no changes are being made. |
denyPermissions |
IList<int> | The permissions to deny. Can be null if no changes are being made. |
inheritanceOptions |
SecurityInheritanceOptions | The inheritance options to use. |
Returns
- AccessControlEntry
The new or updated AccessControlEntry reflecting the permissions.
Remarks
If the descriptor already contains an AccessControlEntry matching the
entity and inheritanceOptions, that entry's permissions
are updated with the grantPermissions and denyPermissions. Otherwise
a new AccessControlEntry is created with the specified settings and permissions.
CopyInheritedPermissions()
Copies all inherited permissions into the object's permission set, making them explicit.
public void CopyInheritedPermissions()
GetOrCreateAccessControlEntry(SecurityEntity, SecurityInheritanceOptions)
Gets an AccessControlEntry for the specified entity and inheritance options.
public AccessControlEntry GetOrCreateAccessControlEntry(SecurityEntity securityEntity, SecurityInheritanceOptions inheritanceOptions)
Parameters
| Name | Type | Description |
|---|---|---|
securityEntity |
SecurityEntity | The entity to get the entry for. |
inheritanceOptions |
SecurityInheritanceOptions | The inheritance options to use. |
Returns
- AccessControlEntry
A new or existing AccessControlEntry for the combination of
securityEntityandinheritanceOptions. See Remarks.
Remarks
If the descriptor already contains a matching AccessControlEntry it is returned. Otherwise a new AccessControlEntry is created, added to the descriptor, and returned.
RemovePermissions(AccessControlEntry)
Removes the specified AccessControlEntry.
public void RemovePermissions(AccessControlEntry entry)
Parameters
| Name | Type | Description |
|---|---|---|
entry |
AccessControlEntry | The AccessControlEntry to remove. |
Remarks
The specified entry is removed from the descriptor, if present.
RemovePermissions(SecurityEntity)
Removes all permissions defined for the specified SecurityEntity.
public void RemovePermissions(SecurityEntity entity)
Parameters
| Name | Type | Description |
|---|---|---|
entity |
SecurityEntity | The SecurityEntityto remove. |
Remarks
All AccessControlEntries for the specified
entity are removed from the descriptor.
ReplacePermissions(SecurityEntity, IList<int>, IList<int>, SecurityInheritanceOptions)
Replaces the existing permissions for an entity with the specified permissions.
public AccessControlEntry ReplacePermissions(SecurityEntity entity, IList<int> grantPermissions, IList<int> denyPermissions, SecurityInheritanceOptions inheritanceOptions)
Parameters
| Name | Type | Description |
|---|---|---|
entity |
SecurityEntity | The SecurityEntity to replace permissions for. |
grantPermissions |
IList<int> | The permissions to grant. Can be null if no changes are being made. |
denyPermissions |
IList<int> | The permissions to deny. Can be null if no changes are being made. |
inheritanceOptions |
SecurityInheritanceOptions | The inheritance options to use. |
Returns
- AccessControlEntry
The new or updated AccessControlEntry reflecting the permissions.
Remarks
If the descriptor already contains an AccessControlEntry matching the
entity and inheritanceOptions, that entry's permissions
are replaced with the grantPermissions and denyPermissions. Otherwise
a new AccessControlEntry is created with the specified settings and permissions.