PermissionExpressionParser.HasPermission method
Checks a permission that may be a logical expression. A single permission key is passed to hasPermissionKey as is, while for an expression, each permission key in it is passed separately and the results are combined with the operators.
public static bool HasPermission(string permission, Func<string, bool> hasPermissionKey)
| parameter |
description |
| permission |
Permission or permission expression |
| hasPermissionKey |
Checks a single permission key |
Exceptions
| exception |
condition |
| InvalidOperationException |
The expression is malformed, e.g. "A|" or "(A", which is usually a typo in an attribute or setting. |
See Also