CommonObjectSecurity.ModifyAccess(AccessControlModification, AccessRule, Boolean) CommonObjectSecurity.ModifyAccess(AccessControlModification, AccessRule, Boolean) CommonObjectSecurity.ModifyAccess(AccessControlModification, AccessRule, Boolean) CommonObjectSecurity.ModifyAccess(AccessControlModification, AccessRule, Boolean) Method

定義

將指定的修改套用至與這個 CommonObjectSecurity 物件關聯的判別存取控制清單 (DACL)。Applies the specified modification to the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object.

protected:
 override bool ModifyAccess(System::Security::AccessControl::AccessControlModification modification, System::Security::AccessControl::AccessRule ^ rule, [Runtime::InteropServices::Out] bool % modified);
protected override bool ModifyAccess (System.Security.AccessControl.AccessControlModification modification, System.Security.AccessControl.AccessRule rule, out bool modified);
override this.ModifyAccess : System.Security.AccessControl.AccessControlModification * System.Security.AccessControl.AccessRule * bool -> bool
Protected Overrides Function ModifyAccess (modification As AccessControlModification, rule As AccessRule, ByRef modified As Boolean) As Boolean

參數

modification
AccessControlModification AccessControlModification AccessControlModification AccessControlModification

要套用至 DACL 的修改。The modification to apply to the DACL.

rule
AccessRule AccessRule AccessRule AccessRule

要修改的存取規則。The access rule to modify.

modified
Boolean Boolean Boolean Boolean

如果成功修改 DACL,則為 true,否則為 falsetrue if the DACL is successfully modified; otherwise, false.

傳回

如果成功修改 DACL,則為 true,否則為 falsetrue if the DACL is successfully modified; otherwise, false.

備註

為避免不小心允許存取主體,應用程式應該檢查是否有允許每個人完整存取(AEFA)存取控制專案(ACE),並在修改 DACL 之前將它移除。To avoid unintentionally allowing access to principals, applications should check for the existence of an allow everyone full access (AEFA) access control entry (ACE) and remove it before modifying a DACL.

適用於