MessageQueueAccessControlEntry MessageQueueAccessControlEntry MessageQueueAccessControlEntry MessageQueueAccessControlEntry Class

定義

指定信任項 (Trustee) (使用者、群組或電腦) 執行訊息佇列工作的存取權。Specifies access rights for a trustee (user, group, or computer) to perform Message Queuing tasks.

public ref class MessageQueueAccessControlEntry : System::Messaging::AccessControlEntry
public class MessageQueueAccessControlEntry : System.Messaging.AccessControlEntry
type MessageQueueAccessControlEntry = class
    inherit AccessControlEntry
Public Class MessageQueueAccessControlEntry
Inherits AccessControlEntry
繼承
MessageQueueAccessControlEntryMessageQueueAccessControlEntryMessageQueueAccessControlEntryMessageQueueAccessControlEntry

備註

MessageQueueAccessControlEntry使用類別來指定要套用至信任者的許可權。Use the MessageQueueAccessControlEntry class to specify rights to apply to a trustee. 這些許可權包括查看、接收或傳送訊息;查看或修改佇列屬性或許可權;和刪除佇列。These rights include peeking, receiving, or sending messages; viewing or modifying queue properties or permissions; and deleting queues. 類別的SetPermissions方法提供多載, 以便將這個類別的實例直接傳遞至方法, 或將AccessControlList它加入至的實例, 讓您一次可以為一個以上的信任者加入許可權。 MessageQueueThe MessageQueue class's SetPermissions method provides overloads for passing an instance of this class directly into the method, or adding it to an instance of AccessControlList so that you can add rights for more than one trustee at a time. 新的存取權限會附加到佇列的任意存取控制清單 (DACL) 結尾, 以識別可存取佇列的使用者和群組。The new access right is appended to the end of the queue's discretionary access control list (DACL), which identifies the users and groups that can access the queue.

這個一般化有一些例外, 就是新增右方的位置及其效果。There are some exceptions to this generalization about where the new right is added and its effects. 如需詳細資訊,請參閱System.MessagingFor more information, see System.Messaging.

MessageQueueAccessControlEntry函式的多載可讓您AccessControlEntryType指定成員, 以指出是否要允許或拒絕信任者的許可權。An overload of the MessageQueueAccessControlEntry constructor allows you specify a AccessControlEntryType member to indicate whether to allow or deny rights to the trustee. 在資源的 DACL 中, 允許或拒絕許可權的順序會影響信任者是否具有指定的許可權。The order in which rights are allowed or denied in the resource's DACL affects whether the trustee has the specified rights. 例如, 如果已將許可權授與給信任者, 而且您稍後新增拒絕它們的專案, 系統就會先尋找授與的許可權, 讓使用者被授與許可權, 而您可能會被拒絕。For example, if rights have already been granted to the trustee and you later add an entry that denies them, the system finds the granted rights first, so the user is granted rights you might have intended they be denied. 您可以使用兩種專案類型來覆寫此Set行為Revoke: 和。You can use two entry types to override this behavior: Set and Revoke. 如需控制存取權限判斷方式的詳細資訊, 請參閱AccessControlEntryType列舉主題。For more information about controlling the way in which access rights are determined, see the AccessControlEntryType enumeration topic.

MessageQueueAccessControlEntry類別會與以存取控制清單 (acl) 為基礎的安全性相關聯, 您可以用它來授與使用者對訊息佇列系統本身的存取權。The MessageQueueAccessControlEntry class is associated with security based on access control lists (ACLs), which you can use to give users access to the Message Queuing system itself. 這與代碼啟用安全性不同, 它是透過MessageQueuePermission和相關類別來執行。This is different from code access security, which is implemented through the MessageQueuePermission and related classes. 訊息佇列代碼啟用安全性會定義應用程式可能需要的佇列專屬作業或佇列存取權, 而這會受到安全性控制;它不代表應用程式執行這些作業或接收本身的存取權的許可權。Message Queuing code access security defines queue-specific operations or queue access that an application might require which is subject to security control; it does not represent a right for the application to perform these operations or receive access in and of itself. 如需代碼啟用安全性的詳細資訊, 請參閱代碼啟用安全性主題。See the topic Code Access Security for more information about code access security.

若要為信任者設定訊息佇列許可權, 請建立Trustee類別的新實例, 並將它傳遞至此MessageQueueAccessControlEntry函式的多載。To set message queue permissions for a trustee, create a new instance of the Trustee class and pass it into an overload of the MessageQueueAccessControlEntry constructor. 藉由MessageQueueAccessRights MessageQueueAccessControlEntry將的實例傳遞至函式, 或在現有的實例上設定屬性,來指定訊息佇列存取權限。MessageQueueAccessRightsSpecify the message queue access rights either by passing an instance of MessageQueueAccessRights into the constructor or by setting the MessageQueueAccessRights property on an existing MessageQueueAccessControlEntry instance.

接著, 您可以將MessageQueueAccessControlEntry實例直接傳遞MessageQueue.SetPermissions至方法, 或在呼叫SetPermissions之前將專案加入至的AccessControlList實例。You can then pass the MessageQueueAccessControlEntry instance directly to the MessageQueue.SetPermissions method, or alternately add the entry to an instance of AccessControlList before calling SetPermissions.

建構函式

MessageQueueAccessControlEntry(Trustee, MessageQueueAccessRights) MessageQueueAccessControlEntry(Trustee, MessageQueueAccessRights) MessageQueueAccessControlEntry(Trustee, MessageQueueAccessRights) MessageQueueAccessControlEntry(Trustee, MessageQueueAccessRights)

初始化 MessageQueueAccessControlEntry 類別的新執行個體,將指定的訊息佇列存取權授與指定的信任項。Initializes a new instance of the MessageQueueAccessControlEntry class, granting the specified Message Queuing access rights to the specified trustee.

MessageQueueAccessControlEntry(Trustee, MessageQueueAccessRights, AccessControlEntryType) MessageQueueAccessControlEntry(Trustee, MessageQueueAccessRights, AccessControlEntryType) MessageQueueAccessControlEntry(Trustee, MessageQueueAccessRights, AccessControlEntryType) MessageQueueAccessControlEntry(Trustee, MessageQueueAccessRights, AccessControlEntryType)

以指定的信任項和訊息佇列存取權,初始化 MessageQueueAccessControlEntry 類別的新執行個體。Initializes a new instance of the MessageQueueAccessControlEntry class, with the specified trustee and Message Queuing access rights. 存取類型 (例如 AllowDeny) 是由您傳入的項目類型來定義。The type of access (such as Allow or Deny) is defined by the entry type you pass in.

屬性

CustomAccessRights CustomAccessRights CustomAccessRights CustomAccessRights

取得或設定自訂存取權限。Gets or sets custom access rights.

(Inherited from AccessControlEntry)
EntryType EntryType EntryType EntryType

取得或設定值,指出套用存取權限至信任項的情形。Gets or sets a value that indicates how the access rights apply to the trustee.

(Inherited from AccessControlEntry)
GenericAccessRights GenericAccessRights GenericAccessRights GenericAccessRights

取得或設定同時對應至標準和物件專用的讀取、寫入和執行存取權限的一般存取權限集合。Gets or sets a set of common access rights that map to both standard and object-specific access rights for reading, writing, and executing.

(Inherited from AccessControlEntry)
MessageQueueAccessRights MessageQueueAccessRights MessageQueueAccessRights MessageQueueAccessRights

取得或設定要套用至信任項的訊息佇列專用權限集合。Gets or sets the set of Message Queuing-specific rights to apply to the trustee.

StandardAccessRights StandardAccessRights StandardAccessRights StandardAccessRights

取得或設定對應至大部分安全物件類型作業的標準存取權限。Gets or sets a set of standard access rights that correspond to operations common to most types of securable objects.

(Inherited from AccessControlEntry)
Trustee Trustee Trustee Trustee

取得或設定您要指派存取權限的使用者、群組、電腦、網域或別名。Gets or sets the user, group, domain, or alias to which you are assigning access rights.

(Inherited from AccessControlEntry)

方法

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)

適用於

另請參閱