new AuthorizationContext(action, targetName, brokenRules)
Creates a new authorization context object. Warning: Authorization context objects are created in models internally. They are intended only to make publicly available the context for custom authorization rules.
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
action |
bo.rules.AuthorizationAction | The operation to authorize. |
|
targetName |
string |
<optional> |
Eventual parameter of the authorization action. |
brokenRules |
bo.rules.BrokenRuleList | The list of the broken rules. |
Throws:
-
Argument error: The action must be an AuthorizationAction item.
-
Argument error: The target name must be a string value.
-
Argument error: The broken rules must be a BrokenRuleList object.
Members
-
<readonly> brokenRules :bo.rules.BrokenRuleList
-
The list of the broken rules.
Type:
-
<readonly> locale :string
-
The current locale.
Type:
- string
-
<readonly> ruleId :string
-
The identifier of the authorization action. Generally it is the action value, or when target is not empty, the action value and the target name separated by a dot, respectively.
Type:
- string
-
<readonly> user :bo.system.UserInfo
-
The current user.
Type: