annacl v2.0.0 Annacl.Behaviour.RoleAndPermission behaviour View Source

Link to this section Summary

Link to this section Callbacks

Specs

create_performer() ::
  {:ok, Annacl.Performers.Performer.t()} | {:error, Ecto.Changeset.t()}
Link to this callback

create_permission(binary)

View Source

Specs

create_permission(binary()) ::
  {:ok, Annacl.Permissions.Permission.t()} | {:error, Ecto.Changeset.t()}

Specs

create_role(binary()) ::
  {:ok, Annacl.Roles.Role.t()} | {:error, Ecto.Changeset.t()}

Specs

get_permission!(binary()) :: Annacl.Permissions.Permission.t()

Specs

get_role!(binary()) :: Annacl.Roles.Role.t()
Link to this callback

grant_permission_to_role!(arg1, arg2)

View Source

Specs

grant_permission_to_role!(Annacl.Roles.Role.t(), binary() | [binary()]) ::
  Annacl.Roles.Role.t()
Link to this callback

revoke_permission_from_role!(arg1, arg2)

View Source

Specs

revoke_permission_from_role!(Annacl.Roles.Role.t(), binary() | [binary()]) ::
  Annacl.Roles.Role.t()
Link to this callback

role_has_permission?(arg1, binary)

View Source

Specs

role_has_permission?(Annacl.Roles.Role.t(), binary()) :: boolean()
Link to this callback

update_permission(arg1, binary)

View Source

Specs

Link to this callback

update_role(arg1, binary)

View Source

Specs

update_role(Annacl.Roles.Role.t(), binary()) ::
  {:ok, Annacl.Roles.Role.t()} | {:error, Ecto.Changeset.t()}