PurgeAudit() public méthode

public PurgeAudit ( System.Security.Principal.SecurityIdentifier sid ) : void
sid System.Security.Principal.SecurityIdentifier
Résultat void
        public virtual void PurgeAuditRules(IdentityReference identity)
        {
            if (null == identity)
            {
                throw new ArgumentNullException("identity");
            }

            WriteLock();
            try {
                descriptor.PurgeAudit(SidFromIR(identity));
            } finally {
                WriteUnlock();
            }
        }
Exemple #2
0
        public virtual void PurgeAuditRules(IdentityReference identity)
        {
            if (identity == null)
            {
                throw new ArgumentNullException(nameof(identity));
            }

            WriteLock();

            try
            {
                _securityDescriptor.PurgeAudit(identity.Translate(typeof(SecurityIdentifier)) as SecurityIdentifier);
                _saclModified = true;
            }
            finally
            {
                WriteUnlock();
            }
        }
		public void PurgeNullSaclWithoutError ()
		{
			SecurityIdentifier userSid = new SecurityIdentifier ("SY");
			SecurityIdentifier groupSid = new SecurityIdentifier ("BA");

			CommonSecurityDescriptor csd = new CommonSecurityDescriptor
				(false, false, ControlFlags.None, userSid, groupSid, null, null);
			csd.PurgeAudit (userSid);
			Assert.IsNull (csd.SystemAcl);
		}