public void FileSystemRights_ReturnValidObject() { var auditRule = new FileSystemAuditRule(@"MYDOMAIN\MyAccount", FileSystemRights.ReadData, AuditFlags.Failure); FileSystemRights fileSystemRights = auditRule.FileSystemRights; Assert.Equal(fileSystemRights, FileSystemRights.ReadData); }
public void ObjectInitialization_IdentityReference_FileSystemRights_AuditFlags_Success() { var auditRule = new FileSystemAuditRule(Helpers.s_WorldSidNTAccount, FileSystemRights.ReadData, AuditFlags.Failure); Assert.Equal(auditRule.IdentityReference, Helpers.s_WorldSidNTAccount); Assert.Equal(auditRule.FileSystemRights, FileSystemRights.ReadData); Assert.Equal(auditRule.AuditFlags, AuditFlags.Failure); }
public void ObjectInitialization_Identity_FileSystemRights_AuditFlags_Success() { var auditRule = new FileSystemAuditRule(@"MYDOMAIN\MyAccount", FileSystemRights.ReadData, AuditFlags.Failure); Assert.Equal(auditRule.FileSystemRights, FileSystemRights.ReadData); Assert.Equal(auditRule.AuditFlags, AuditFlags.Failure); Assert.Equal(auditRule.IdentityReference.Value, @"MYDOMAIN\MyAccount"); }
public void ObjectInitialization_Identity_FileSystemRights_AuditFlags_InheritanceFlag_PropagationFlag_Success() { var auditRule = new FileSystemAuditRule(@"MYDOMAIN\MyAccount", FileSystemRights.ReadData, InheritanceFlags.ObjectInherit, PropagationFlags.InheritOnly, AuditFlags.Failure); Assert.Equal(auditRule.PropagationFlags, PropagationFlags.InheritOnly); Assert.Equal(auditRule.InheritanceFlags, InheritanceFlags.ObjectInherit); }
public void ObjectInitialization_IdentityReference_FileSystemRights_AuditFlags_Success() { var identity = new SecurityIdentifier(WellKnownSidType.WorldSid, null); var auditRule = new FileSystemAuditRule(identity, FileSystemRights.ReadData, AuditFlags.Failure); Assert.Equal(auditRule.IdentityReference, identity); Assert.Equal(auditRule.FileSystemRights, FileSystemRights.ReadData); Assert.Equal(auditRule.AuditFlags, AuditFlags.Failure); }
public void SetAuditRule(FileSystemAuditRule rule) { base.SetAuditRule(rule); }
public void AddAuditRule (FileSystemAuditRule rule) { AddAuditRule ((AuditRule)rule); }
public void RemoveAuditRuleSpecific(FileSystemAuditRule rule) { base.RemoveAuditRuleSpecific(rule); }
public bool RemoveAuditRule(FileSystemAuditRule rule) { return base.RemoveAuditRule(rule); }
public void AddAuditRule(FileSystemAuditRule rule) { base.AddAuditRule(rule); }
/// <summary>Removes all matching allow or deny audit rules from the current file or directory.</summary><returns>true if the audit rule was removed; otherwise, false</returns><param name="rule">A <see cref="T:System.Security.AccessControl.FileSystemAuditRule" /> object that represents an audit rule to remove from a file or directory.</param><exception cref="T:System.ArgumentNullException">The <paramref name="rule" /> parameter is null.</exception> public bool RemoveAuditRule(FileSystemAuditRule rule) { throw new NotImplementedException(); }
public void SetAuditRule (FileSystemAuditRule rule) { throw new NotImplementedException (); }
public void RemoveAuditRuleSpecific (FileSystemAuditRule rule) { throw new NotImplementedException (); }
public bool RemoveAuditRule (FileSystemAuditRule rule) { throw new NotImplementedException (); }
public void SetAuditRule (FileSystemAuditRule rule) { SetAuditRule((AuditRule)rule); }
public void RemoveAuditRuleSpecific (FileSystemAuditRule rule) { RemoveAuditRuleSpecific((AuditRule)rule); }
public bool RemoveAuditRule (FileSystemAuditRule rule) { return RemoveAuditRule((AuditRule)rule); }
public void RemoveAuditRuleAll(FileSystemAuditRule rule) { base.RemoveAuditRuleAll(rule); }
public void SetAuditRule(FileSystemAuditRule rule) { }
/// <summary>Sets the specified audit rule for the current file or directory.</summary><param name="rule">A <see cref="T:System.Security.AccessControl.FileSystemAuditRule" /> object that represents an audit rule to set for a file or directory.</param><exception cref="T:System.ArgumentNullException">The <paramref name="rule" /> parameter is null.</exception> public void SetAuditRule(FileSystemAuditRule rule) { throw new NotImplementedException(); }
public void AddAuditRule(FileSystemAuditRule rule) { }
/// <summary>Removes all audit rules for the specified user from the current file or directory.</summary><param name="rule">A <see cref="T:System.Security.AccessControl.FileSystemAuditRule" /> object that specifies a user whose audit rules should be removed from a file or directory.</param><exception cref="T:System.ArgumentNullException">The <paramref name="rule" /> parameter is null.</exception> public void RemoveAuditRuleAll(FileSystemAuditRule rule) { throw new NotImplementedException(); }
public bool RemoveAuditRule(FileSystemAuditRule rule) { return default(bool); }
public void RemoveAuditRuleAll(FileSystemAuditRule rule) { }
public void AddAuditRule(FileSystemAuditRule rule) { AddAuditRule((AuditRule)rule); }
public bool RemoveAuditRule(FileSystemAuditRule rule) { return(default(bool)); }
public bool RemoveAuditRule(FileSystemAuditRule rule) { return(RemoveAuditRule((AuditRule)rule)); }
public void RemoveAuditRuleAll(FileSystemAuditRule rule) { RemoveAuditRuleAll((AuditRule)rule); }
public void RemoveAuditRuleSpecific(FileSystemAuditRule rule) { RemoveAuditRuleSpecific((AuditRule)rule); }
public bool RemoveAuditRule(FileSystemAuditRule rule) { return(base.RemoveAuditRule(rule)); }
public void SetAuditRule(FileSystemAuditRule rule) { SetAuditRule((AuditRule)rule); }
/// <summary>使用以下内容初始化 <see cref="T:System.Security.AccessControl.FileSystemAuditRule" /> 类的新实例:用户帐户的名称、指定与审核规则关联的操作的类型的值、确定如何继承权限的值、确定如何传播权限的值,以及指定何时执行审核的值。</summary> /// <param name="identity">用户帐户的名称。</param> /// <param name="fileSystemRights"> /// <see cref="T:System.Security.AccessControl.FileSystemRights" /> 值之一,该值指定与审核规则关联的操作的类型。</param> /// <param name="inheritanceFlags"> /// <see cref="T:System.Security.AccessControl.InheritanceFlags" /> 值之一,该值指定访问掩码如何传播到子对象。</param> /// <param name="propagationFlags"> /// <see cref="T:System.Security.AccessControl.PropagationFlags" /> 值之一,该值指定访问控制项 (ACE) 如何传播到子对象。</param> /// <param name="flags"> /// <see cref="T:System.Security.AccessControl.AuditFlags" /> 值之一,该值指定何时执行审核。</param> public FileSystemAuditRule(string identity, FileSystemRights fileSystemRights, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags) : this((IdentityReference) new NTAccount(identity), FileSystemAuditRule.AccessMaskFromRights(fileSystemRights), false, inheritanceFlags, propagationFlags, flags) { }