DataServiceConfiguration.SetServiceActionAccessRule 方法
為指定的服務動作設定權限。
命名空間: System.Data.Services
組件: Microsoft.Data.Services (在 Microsoft.Data.Services.dll 中)
語法
'宣告
Public Sub SetServiceActionAccessRule ( _
name As String, _
rights As ServiceActionRights _
)
'用途
Dim instance As DataServiceConfiguration
Dim name As String
Dim rights As ServiceActionRights
instance.SetServiceActionAccessRule(name, _
rights)
public void SetServiceActionAccessRule(
string name,
ServiceActionRights rights
)
public:
void SetServiceActionAccessRule(
String^ name,
ServiceActionRights rights
)
member SetServiceActionAccessRule :
name:string *
rights:ServiceActionRights -> unit
public function SetServiceActionAccessRule(
name : String,
rights : ServiceActionRights
)
參數
- name
型別:System.String
要為其設定權限的服務動作名稱。
- rights
型別:System.Data.Services.ServiceActionRights
要授與此動作的存取權,以 ServiceActionRights 值的形式傳遞。
備註
當您為 name 參數指定 '*' 值,將會針對未明確設定權限的所有服務動作設定權限。