117 lines
5.1 KiB
C#
117 lines
5.1 KiB
C#
using System;
|
|
using System.Security.Principal;
|
|
|
|
namespace System.Security.AccessControl
|
|
{
|
|
/// <summary>Determines access to securable objects. The derived classes <see cref="T:System.Security.AccessControl.AccessRule" /> and <see cref="T:System.Security.AccessControl.AuditRule" /> offer specializations for access and audit functionality.</summary>
|
|
// Token: 0x020004AC RID: 1196
|
|
public abstract class AuthorizationRule
|
|
{
|
|
// Token: 0x06002CB1 RID: 11441 RVA: 0x00092EF8 File Offset: 0x000910F8
|
|
internal AuthorizationRule()
|
|
{
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AuthorizationControl.AccessRule" /> class by using the specified values.</summary>
|
|
/// <param name="identity">The identity to which the access rule applies. This parameter must be an object that can be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" />.</param>
|
|
/// <param name="accessMask">The access mask of this rule. The access mask is a 32-bit collection of anonymous bits, the meaning of which is defined by the individual integrators.</param>
|
|
/// <param name="isInherited">true to inherit this rule from a parent container.</param>
|
|
/// <param name="inheritanceFlags">The inheritance properties of the access rule.</param>
|
|
/// <param name="propagationFlags">Whether inherited access rules are automatically propagated. The propagation flags are ignored if <paramref name="inheritanceFlags" /> is set to <see cref="F:System.Security.AccessControl.InheritanceFlags.None" />.</param>
|
|
/// <exception cref="T:System.ArgumentException">The value of the <paramref name="identity" /> parameter cannot be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" />.</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">The value of the <paramref name="accessMask" /> parameter is zero, or the <paramref name="inheritanceFlags" /> or <paramref name="propagationFlags" /> parameters contain unrecognized flag values.</exception>
|
|
// Token: 0x06002CB2 RID: 11442 RVA: 0x00092F00 File Offset: 0x00091100
|
|
protected internal AuthorizationRule(IdentityReference identity, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)
|
|
{
|
|
if (!(identity is SecurityIdentifier))
|
|
{
|
|
throw new ArgumentException("identity");
|
|
}
|
|
if (accessMask == 0)
|
|
{
|
|
throw new ArgumentOutOfRangeException();
|
|
}
|
|
this.identity = identity;
|
|
this.accessMask = accessMask;
|
|
this.isInherited = isInherited;
|
|
this.inheritanceFlags = inheritanceFlags;
|
|
this.propagationFlags = propagationFlags;
|
|
}
|
|
|
|
/// <summary>Gets the <see cref="T:System.Security.Principal.IdentityReference" /> to which this rule applies.</summary>
|
|
/// <returns>The <see cref="T:System.Security.Principal.IdentityReference" /> to which this rule applies.</returns>
|
|
// Token: 0x170008BA RID: 2234
|
|
// (get) Token: 0x06002CB3 RID: 11443 RVA: 0x00092F5C File Offset: 0x0009115C
|
|
public IdentityReference IdentityReference
|
|
{
|
|
get
|
|
{
|
|
return this.identity;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the value of flags that determine how this rule is inherited by child objects.</summary>
|
|
/// <returns>A bitwise combination of the enumeration values.</returns>
|
|
// Token: 0x170008BB RID: 2235
|
|
// (get) Token: 0x06002CB4 RID: 11444 RVA: 0x00092F64 File Offset: 0x00091164
|
|
public InheritanceFlags InheritanceFlags
|
|
{
|
|
get
|
|
{
|
|
return this.inheritanceFlags;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets a value indicating whether this rule is explicitly set or is inherited from a parent container object.</summary>
|
|
/// <returns>true if this rule is not explicitly set but is instead inherited from a parent container.</returns>
|
|
// Token: 0x170008BC RID: 2236
|
|
// (get) Token: 0x06002CB5 RID: 11445 RVA: 0x00092F6C File Offset: 0x0009116C
|
|
public bool IsInherited
|
|
{
|
|
get
|
|
{
|
|
return this.isInherited;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the value of the propagation flags, which determine how inheritance of this rule is propagated to child objects. This property is significant only when the value of the <see cref="T:System.Security.AccessControl.InheritanceFlags" /> enumeration is not <see cref="F:System.Security.AccessControl.InheritanceFlags.None" />.</summary>
|
|
/// <returns>A bitwise combination of the enumeration values.</returns>
|
|
// Token: 0x170008BD RID: 2237
|
|
// (get) Token: 0x06002CB6 RID: 11446 RVA: 0x00092F74 File Offset: 0x00091174
|
|
public PropagationFlags PropagationFlags
|
|
{
|
|
get
|
|
{
|
|
return this.propagationFlags;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the access mask for this rule.</summary>
|
|
/// <returns>The access mask for this rule.</returns>
|
|
// Token: 0x170008BE RID: 2238
|
|
// (get) Token: 0x06002CB7 RID: 11447 RVA: 0x00092F7C File Offset: 0x0009117C
|
|
protected internal int AccessMask
|
|
{
|
|
get
|
|
{
|
|
return this.accessMask;
|
|
}
|
|
}
|
|
|
|
// Token: 0x04001197 RID: 4503
|
|
private IdentityReference identity;
|
|
|
|
// Token: 0x04001198 RID: 4504
|
|
private int accessMask;
|
|
|
|
// Token: 0x04001199 RID: 4505
|
|
private bool isInherited;
|
|
|
|
// Token: 0x0400119A RID: 4506
|
|
private InheritanceFlags inheritanceFlags;
|
|
|
|
// Token: 0x0400119B RID: 4507
|
|
private PropagationFlags propagationFlags;
|
|
}
|
|
}
|