View Source Rolex.Check (Rolex v0.4.1)
Functions for checking permissions.
Summary
Functions
Returns true if any of the given permissions meeting the conditions in opts
are granted.
Returns true if any of the given permissions meeting the conditions in opts
are granted.
Types
@type any_on_opt() :: Rolex.DSL.any_on_opt()
@type any_role() :: Rolex.DSL.any_role()
@type any_role_opt() :: Rolex.DSL.any_role_opt()
@type any_scope() :: Rolex.DSL.any_scope()
@type any_to_opt() :: Rolex.DSL.any_to_opt()
Functions
@spec granted?([Rolex.Permission.t()], [any_role_opt() | any_to_opt() | any_on_opt()]) :: boolean()
Returns true if any of the given permissions meeting the conditions in opts
are granted.
@spec granted_on?([Rolex.Permission.t()], any_scope(), [any_role_opt() | any_to_opt()]) :: boolean()
@spec granted_role?([Rolex.Permission.t()], any_role(), [any_to_opt() | any_on_opt()]) :: boolean()
Returns true if any of the given permissions meeting the conditions in opts
are granted.
@spec granted_to?([Rolex.Permission.t()], any_scope(), [any_role_opt() | any_on_opt()]) :: boolean()