Function check_permission
Source pub fn check_permission(
auth_token: &AuthToken,
required_permission: &str,
) -> bool
Expand description
Check whether auth_token carries the given permission.
Supports exact matches, a wildcard "*", and prefix wildcards such as
"read:*" (matches "read:users", "read:settings", etc.).
§Example
ⓘif check_permission(&token, "users:write") {
}