Class WMAccessManager
Manages access privileges throughout the WM API
Inherited Members
Namespace: Quantellia.WMServer.Auth
Assembly: WMServer.dll
Syntax
public static class WMAccessManager
Fields
Deny
Constant indicating a privilige is to be denied.
Declaration
public static string Deny
Field Value
Type | Description |
---|---|
string |
Grant
Constant indicating a privilige is to be granted.
Declaration
public static string Grant
Field Value
Type | Description |
---|---|
string |
Methods
IsAllowed(ControllerBase, string, string)
Declaration
public static Task<bool> IsAllowed(ControllerBase ctrl, string resource, string operation)
Parameters
Type | Name | Description |
---|---|---|
ControllerBase | ctrl | |
string | resource | |
string | operation |
Returns
Type | Description |
---|---|
Task<bool> |
IsAllowed(WMUser, string, string, string)
Test if the requested resource/operation is allowed for the specified user/agent
Declaration
public static Task<bool> IsAllowed(WMUser user, string apiKey, string resource, string operation)
Parameters
Type | Name | Description |
---|---|---|
WMUser | user | User requesting access |
string | apiKey | API Key under which user is requesting access. |
string | resource | Resource to which acceess is being requested. |
string | operation | Action on the requested resource to which access is being requested. |
Returns
Type | Description |
---|---|
Task<bool> | true if access is granted. Otherwise, an exception is thrown with a messaged describing the reason that acceess was denied. |