internal static int AccessMaskFromPropertyAccess(PropertyAccess access) { int accessMask = 0; if (access < PropertyAccess.Read || access > PropertyAccess.Write) { throw new InvalidEnumArgumentException("access", (int)access, typeof(PropertyAccess)); } switch (access) { case PropertyAccess.Read: { accessMask = ActiveDirectoryRightsTranslator.AccessMaskFromRights(ActiveDirectoryRights.ReadProperty); break; } case PropertyAccess.Write: { accessMask = ActiveDirectoryRightsTranslator.AccessMaskFromRights(ActiveDirectoryRights.WriteProperty); break; } default: // // This should not happen. Indicates a problem with the // internal logic. // Debug.Fail("Invalid PropertyAccess value"); throw new ArgumentException("access"); } return(accessMask); }
public ActiveDirectoryAccessRule( IdentityReference identity, ActiveDirectoryRights adRights, AccessControlType type, ActiveDirectorySecurityInheritance inheritanceType) : this( identity, ActiveDirectoryRightsTranslator.AccessMaskFromRights(adRights), type, Guid.Empty, false, ActiveDirectoryInheritanceTranslator.GetInheritanceFlags(inheritanceType), ActiveDirectoryInheritanceTranslator.GetPropagationFlags(inheritanceType), Guid.Empty) { }
public ActiveDirectoryAccessRule( IdentityReference identity, ActiveDirectoryRights adRights, AccessControlType type, Guid objectType) : this( identity, ActiveDirectoryRightsTranslator.AccessMaskFromRights(adRights), type, objectType, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty) { }
public ActiveDirectoryAuditRule( IdentityReference identity, ActiveDirectoryRights adRights, AuditFlags auditFlags) : this( identity, ActiveDirectoryRightsTranslator.AccessMaskFromRights(adRights), auditFlags, Guid.Empty, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty ) { }
internal static int AccessMaskFromPropertyAccess(PropertyAccess access) { if ((access < PropertyAccess.Read) || (access > PropertyAccess.Write)) { throw new InvalidEnumArgumentException("access", (int)access, typeof(PropertyAccess)); } switch (access) { case PropertyAccess.Read: return(ActiveDirectoryRightsTranslator.AccessMaskFromRights(ActiveDirectoryRights.ReadProperty)); case PropertyAccess.Write: return(ActiveDirectoryRightsTranslator.AccessMaskFromRights(ActiveDirectoryRights.WriteProperty)); } throw new ArgumentException("access"); }
public ActiveDirectoryAuditRule( IdentityReference identity, ActiveDirectoryRights adRights, AuditFlags auditFlags, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType) : this( identity, ActiveDirectoryRightsTranslator.AccessMaskFromRights(adRights), auditFlags, Guid.Empty, false, ActiveDirectoryInheritanceTranslator.GetInheritanceFlags(inheritanceType), ActiveDirectoryInheritanceTranslator.GetPropagationFlags(inheritanceType), inheritedObjectType) { }
public ActiveDirectoryAccessRule(IdentityReference identity, System.DirectoryServices.ActiveDirectoryRights adRights, AccessControlType type, Guid objectType, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType) : this(identity, ActiveDirectoryRightsTranslator.AccessMaskFromRights(adRights), type, objectType, false, ActiveDirectoryInheritanceTranslator.GetInheritanceFlags(inheritanceType), ActiveDirectoryInheritanceTranslator.GetPropagationFlags(inheritanceType), inheritedObjectType) { }
public ActiveDirectoryAuditRule(IdentityReference identity, ActiveDirectoryRights adRights, AuditFlags auditFlags, Guid objectType) : this(identity, ActiveDirectoryRightsTranslator.AccessMaskFromRights(adRights), auditFlags, objectType, false, 0, 0, Guid.Empty) { }
public ActiveDirectoryAccessRule(IdentityReference identity, ActiveDirectoryRights adRights, AccessControlType type, Guid objectType) : this(identity, ActiveDirectoryRightsTranslator.AccessMaskFromRights(adRights), type, objectType, false, 0, 0, Guid.Empty) { }