Udostępnij za pośrednictwem


Metoda BrokerService.Grant (ObjectPermissionSet, String, Boolean, String)

Udziela dostępu do określonych uprawnień i możliwości udzielenia dostępu innym użytkownikom określonej grantee na Service Broker usługa.

Przestrzeń nazw:  Microsoft.SqlServer.Management.Smo.Broker
Zestaw:  Microsoft.SqlServer.Smo (w Microsoft.SqlServer.Smo.dll)

Składnia

'Deklaracja
Public Sub Grant ( _
    permission As ObjectPermissionSet, _
    granteeName As String, _
    grantGrant As Boolean, _
    asRole As String _
)
'Użycie
Dim instance As BrokerService
Dim permission As ObjectPermissionSet
Dim granteeName As String
Dim grantGrant As Boolean
Dim asRole As String

instance.Grant(permission, granteeName, _
    grantGrant, asRole)
public void Grant(
    ObjectPermissionSet permission,
    string granteeName,
    bool grantGrant,
    string asRole
)
public:
virtual void Grant(
    ObjectPermissionSet^ permission, 
    String^ granteeName, 
    bool grantGrant, 
    String^ asRole
) sealed
abstract Grant : 
        permission:ObjectPermissionSet * 
        granteeName:string * 
        grantGrant:bool * 
        asRole:string -> unit 
override Grant : 
        permission:ObjectPermissionSet * 
        granteeName:string * 
        grantGrant:bool * 
        asRole:string -> unit 
public final function Grant(
    permission : ObjectPermissionSet, 
    granteeName : String, 
    grantGrant : boolean, 
    asRole : String
)

Parametry

  • granteeName
    Typ: System.String
    A String wartość określająca grantee, aby odmówić dostępu do uprawnień.
  • grantGrant
    Typ: System.Boolean
    A Boolean właściwość, która określa, czy grantee jest możliwość udzielenia dostępu do BrokerService obiektu dla innych użytkowników.
    Jeśli True, grantee jest możliwość udostępnienia innym użytkownikom Service Broker usługa.
    Jeśli False, grantee nie jest możliwość udzielenia dostępu do innych użytkowników Service Broker usługa.
  • asRole
    Typ: System.String
    A String wartość, która określa rolę użytkownika zakłada przyznając dostęp do Service Broker usługa do innych użytkowników.Ten parametr służy do stypendystów, którzy są członkami więcej niż jednej roli.

Implementacje

IObjectPermission.Grant(ObjectPermissionSet, String, Boolean, String)