AccessControlEntryType AccessControlEntryType AccessControlEntryType AccessControlEntryType Enum

定义

指定是允许、拒绝还是撤消受信者的访问权限。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.

适用于

另请参阅