AccessControlEntryType AccessControlEntryType AccessControlEntryType AccessControlEntryType Enum

定義

指定是否允許、拒絕、或撤銷信任項 (Trustee) 的存取權限。Specifies whether to allow, deny, or revoke access rights for a trustee.

public enum class AccessControlEntryType
[System.Serializable]
public enum AccessControlEntryType
type AccessControlEntryType = 
Public Enum AccessControlEntryType
繼承
AccessControlEntryTypeAccessControlEntryTypeAccessControlEntryTypeAccessControlEntryType
屬性

欄位

Allow Allow Allow Allow 1

允許存取的項目會將新的權限加入至任何現有的信任項權限。An access-allowed entry that causes the new rights to be added to any existing rights the trustee has.

Deny Deny Deny Deny 3

拒絕存取的項目會將拒絕的指定權限加入信任項目前已拒絕的權限。An access-denied entry that denies the specified rights in addition to any currently denied rights of the trustee.

Revoke Revoke Revoke Revoke 4

移除指定信任項所有的現有允許或拒絕權限的項目。An entry that removes all existing allowed or denied rights for the specified trustee.

Set Set Set Set 2

允許存取的項目類似於 Allow,不同點在於新的項目只允許指定的權限。An access-allowed entry that is similar to Allow, except that the new entry allows only the specified rights. 使用它可以宣告任何現有的權限,包括信任項所有現有允許存取的項目。Using it discards any existing rights, including all existing access-denied entries for the trustee.

備註

當您使用AccessControlEntry類別來為信任者指定新的存取權時, 您會設定EntryType其屬性, 以描述是否授與許可權或拒絕它。When you use the AccessControlEntry class to specify a new access right for a trustee, you set its EntryType property to describe whether to grant the right or deny it. 此外, 您可以定義新的許可權是否附加至現有的清單 (如果信任者已經存在於您要新增或移除存取權限的內容中), 或是新的許可權會覆寫並刪除任何先前定義的許可權。Furthermore, you can define whether the new right is appended to an existing list (if the trustee already exists in the context for which you are adding or removing access privileges) or if the new right overwrites and deletes any previously defined rights.

建立新Allow專案時, 可能會Deny有相同的信任者具有優先的專案, 必須加以處理。When creating a new Allow entry, there might be a preexisting Deny entry for the same trustee that takes precedence and must be addressed. 同樣地, 建立新Deny的專案時, 可能會有具有優先順序的現有Allow專案。Similarly, when creating a new Deny entry, there might be an existing Allow entry that takes precedence. 如需存取權限套用順序的詳細資訊, 請參閱AccessControlListFor information about the order in which access rights are applied, see AccessControlList.

適用於

另請參閱