View Source Rolex.Check (Rolex v0.5.1)
Functions for checking permissions.
Summary
Functions
Returns true if given any granted permissions that meet DSL options.
Returns true if given any granted permissions that meet DSL options, prefilling on: object
.
Returns true if given any granted permissions that meet DSL options, prefilling role: role
.
Returns true if given any granted permissions that meet DSL options, prefilling to: subject
.
Lists roles granted by given permissions that meet DSL options.
Lists roles granted by the given permissions that meet DSL options, prefilling on: object
.
Lists roles granted by the given permissions that meet DSL options, prefilling to: subject
.
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()
@type role() :: Rolex.DSL.role()
Functions
@spec granted?([Rolex.Permission.t()], [any_role_opt() | any_to_opt() | any_on_opt()]) :: boolean()
Returns true if given any granted permissions that meet DSL options.
@spec granted_on?([Rolex.Permission.t()], any_scope(), [any_role_opt() | any_to_opt()]) :: boolean()
Returns true if given any granted permissions that meet DSL options, prefilling on: object
.
@spec granted_role?([Rolex.Permission.t()], any_role(), [any_to_opt() | any_on_opt()]) :: boolean()
Returns true if given any granted permissions that meet DSL options, prefilling role: role
.
@spec granted_to?([Rolex.Permission.t()], any_scope(), [any_role_opt() | any_on_opt()]) :: boolean()
Returns true if given any granted permissions that meet DSL options, prefilling to: subject
.
@spec roles_granted([Rolex.Permission.t()], [ any_role_opt() | any_to_opt() | any_on_opt() ]) :: [role()]
Lists roles granted by given permissions that meet DSL options.
@spec roles_granted_on([Rolex.Permission.t()], any_scope(), [ any_role_opt() | any_to_opt() ]) :: [role()]
Lists roles granted by the given permissions that meet DSL options, prefilling on: object
.
@spec roles_granted_to([Rolex.Permission.t()], any_scope(), [ any_role_opt() | any_on_opt() ]) :: [role()]
Lists roles granted by the given permissions that meet DSL options, prefilling to: subject
.