Alchemy.Permissions.contains-question-mark
You're seeing just the function
contains-question-mark
, go back to Alchemy.Permissions module for more information.
Link to this function
contains?(bitset, permission)
Specs
contains?(Integer, permission()) :: Boolean
Checks for the presence of a permission in a permission bitset.
This should be preferred over using :perm in Permissions.to_list(x)
because this works directly using bitwise operations, and is much
more efficient then going through the permissions.
Examples
Permissions.contains?(role.permissions, :manage_roles)