docs: Policy tweaks (#490)

This commit is contained in:
Rebecca Le 2023-01-29 02:12:23 +08:00 committed by GitHub
parent 72843dbf89
commit 2dfff4476a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View file

@ -127,9 +127,9 @@ defmodule Ash.Policy.Authorizer do
policy always() do
...
end
See the [policies guide](/documentation/topics/policies.md) for more
```
See the [policies guide](/documentation/topics/policies.md) for more.
""",
schema: [
description: [
@ -241,7 +241,7 @@ defmodule Ash.Policy.Authorizer do
For reads, policies can be configured to filter out data that the actor shouldn't see, as opposed to
resulting in a forbidden error.
See the [policies guide](/documentation/topics/flows.md) for practical examples.
See the [policies guide](/documentation/topics/policies.md) for practical examples.
Policies are solved/managed via a boolean satisfiability solver. To read more about boolean satisfiability,
see this page: https://en.wikipedia.org/wiki/Boolean_satisfiability_problem. At the end of

View file

@ -1,6 +1,6 @@
defmodule Ash.Policy.FilterCheckWithContext do
@moduledoc """
A type of check that is represented by a filter statement, and has access to the
A type of check that is represented by a filter statement, and has access to the context.
"""
@type options :: Keyword.t()

View file

@ -8,17 +8,17 @@ defmodule Ash.Policy.Info do
alias Spark.Dsl.Extension
@doc "Whether or not ash policy authorizer is configured to show policy breakdowns in error messages"
@doc "Whether or not Ash policy authorizer is configured to show policy breakdowns in error messages"
def show_policy_breakdowns? do
Application.get_env(:ash, :policies)[:show_policy_breakdowns?] || false
end
@doc "Whether or not ash policy authorizer is configured to show policy breakdowns in error messages"
@doc "Whether or not Ash policy authorizer is configured to log policy breakdowns"
def log_policy_breakdowns do
Application.get_env(:ash, :policies)[:log_policy_breakdowns]
end
@doc "Whether or not ash policy authorizer is configured to show policy breakdowns in error messages"
@doc "Whether or not Ash policy authorizer is configured to log successful policy breakdowns"
def log_successful_policy_breakdowns do
Application.get_env(:ash, :policies)[:log_successful_policy_breakdowns]
end