AshPolicyAuthorizer.Check.BuiltInChecks (ash_policy_authorizer v0.16.5) View Source
The global authorization checks built into ash
Link to this section Summary
Functions
This check is true when the action name matches the provided action name
This check is true when the action type matches the provided type
This check is true when the value of the specified attribute equals the specified value
This check always passes
This check is true when a field on the record matches a specific filter
This check is true when attribute changes correspond to the provided options.
This check is true when the specified relationship is changing
This check is true when the specified relationships are changing
this check never passes
This check passes if the data relates to the actor via the specified relationship or path of relationships
This check is true when the specified relationship is being changed to the current actor
This check is true when the field is being selected and false when it is not
Link to this section Functions
This check is true when the action name matches the provided action name
This check is true when the action type matches the provided type
This check is true when the value of the specified attribute equals the specified value
This check always passes
This check is true when a field on the record matches a specific filter
This check is true when attribute changes correspond to the provided options.
Provide a keyword list of options or just an atom representing the attribute.
For example:
# if you are changing both first name and last name
changing_attributes([:first_name, :last_name])
# if you are changing first name to fred
changing_attributes(first_name: [to: "fred"])
# if you are changing last name from bob
changing_attributes(last_name: [from: "bob"])
# if you are changing :first_name at all, last_name from "bob" and middle name from "tom" to "george"
changing_attributes([:first_name, last_name: [from: "bob"], middle_name: [from: "tom", to: "george]])
This check is true when the specified relationship is changing
This check is true when the specified relationships are changing
this check never passes
This check passes if the data relates to the actor via the specified relationship or path of relationships
This check is true when the specified relationship is being changed to the current actor
This check is true when the field is being selected and false when it is not