annacl v0.1.0 Annacl.Behaviour behaviour

Link to this section Summary

Link to this section Callbacks

Link to this callback

assign_role!(map, binary)

Specs

assign_role!(map(), binary()) :: {:ok, any()} | {:error, Ecto.Changeset.t()}
Link to this callback

assign_role_to_permission(arg1, arg2)

Specs

assign_role_to_permission(
  Annacl.ACL.Permissions.Permission.t(),
  Annacl.ACL.Roles.Role.t()
) :: {:ok, any()} | {:error, Ecto.Changeset.t()}
Link to this callback

can?(arg1, binary)

Specs

can?(binary() | map(), binary()) :: boolean()
Link to this callback

create_permission(map)

Specs

create_permission(map()) ::
  {:ok, Annacl.ACL.Permissions.Permission.t()} | {:error, Ecto.Changeset.t()}
Link to this callback

create_role(map)

Specs

create_role(map()) ::
  {:ok, Annacl.ACL.Roles.Role.t()} | {:error, Ecto.Changeset.t()}
Link to this callback

get_permission!(binary)

Specs

get_permission!(binary()) :: Annacl.ACL.Permissions.Permission.t()
Link to this callback

get_role!(binary)

Specs

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

grant_permission!(map, binary)

Specs

grant_permission!(map(), binary()) ::
  {:ok, any()} | {:error, Ecto.Changeset.t()}
Link to this callback

grant_permission_to_role(arg1, arg2)

Specs

grant_permission_to_role(
  Annacl.ACL.Roles.Role.t(),
  Annacl.ACL.Permissions.Permission.t()
) :: {:ok, PermissionRole.t()} | {:error, Ecto.Changeset.t()}
Link to this callback

has_role?(arg1, binary)

Specs

has_role?(binary() | map(), binary()) :: boolean()
Link to this callback

remove_role!(map, binary)

Specs

remove_role!(map(), binary()) :: {:ok, any()} | {:error, Ecto.Changeset.t()}
Link to this callback

remove_role_from_permission(arg1, arg2)

Specs

remove_role_from_permission(
  Annacl.ACL.Permissions.Permission.t(),
  Annacl.ACL.Roles.Role.t()
) :: {:ok, any()} | {:error, Ecto.Changeset.t()}
Link to this callback

revoke_permission!(map, binary)

Specs

revoke_permission!(map(), binary()) ::
  {:ok, any()} | {:error, Ecto.Changeset.t()}
Link to this callback

revoke_permission_from_role(arg1, arg2)

Specs

revoke_permission_from_role(
  Annacl.ACL.Roles.Role.t(),
  Annacl.ACL.Permissions.Permission.t()
) :: {:ok, PermissionRole.t()} | {:error, Ecto.Changeset.t()}
Link to this callback

role_can?(arg1, arg2)

Specs

role_can?(Annacl.ACL.Roles.Role.t(), Annacl.ACL.Permissions.Permission.t()) ::
  boolean()
Link to this callback

update_role(arg1, map)

Specs

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