Doc: Actor maybe_load_role comment; ActorIsAdmin system user = admin
This commit is contained in:
parent
60a4181255
commit
47b6a16177
2 changed files with 5 additions and 2 deletions
|
|
@ -1,9 +1,10 @@
|
|||
defmodule Mv.Authorization.Checks.ActorIsAdmin do
|
||||
@moduledoc """
|
||||
Policy check: true when the actor's role has permission_set_name "admin".
|
||||
Policy check: true when the actor is the system user or has permission_set_name "admin".
|
||||
|
||||
Used to restrict actions (e.g. User.update_user for member link/unlink) to admins only.
|
||||
Delegates to `Mv.Authorization.Actor.admin?/1` for consistency.
|
||||
Delegates to `Mv.Authorization.Actor.admin?/1`, which returns true for the system actor
|
||||
or for a user whose role has permission_set_name "admin".
|
||||
"""
|
||||
use Ash.Policy.SimpleCheck
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue