Skip to main content

check_permission

Function check_permission 

Source
pub fn check_permission(
    ctx: &ModuleContext<'_>,
    permission: Permission,
) -> Result<(), String>
Expand description

Check whether the current execution context has a required permission.

If granted_permissions is None, all operations are allowed (backwards compatible with code that predates the permission system). If Some, the specific permission must be present in the set.