docs: fix docs for check/4

This commit is contained in:
Zach Daniel 2022-08-16 02:05:45 -04:00
parent 04744f395f
commit 8f2c74da74

View file

@ -38,13 +38,10 @@ defmodule Ash.Policy.Check do
@doc """ @doc """
An optional callback, hat allows the check to work with policies set to `access_type :runtime` An optional callback, hat allows the check to work with policies set to `access_type :runtime`
Takes a list of records, and returns `{:ok, true}` if they are all authorized, or `{:ok, list}` containing the list Takes a list of records, and returns the subset of authorized records.
of records that are authorized. You can also just return the whole list, `{:ok, true}` is just a shortcut.
Can also return `{:error, error}` if something goes wrong
""" """
@callback check(struct(), list(Ash.Resource.record()), map, options) :: @callback check(struct(), list(Ash.Resource.record()), map, options) ::
{:ok, list(Ash.Resource.record()) | boolean} | {:error, Ash.Error.t()} list(Ash.Resource.record())
@doc "Describe the check in human readable format, given the options" @doc "Describe the check in human readable format, given the options"
@callback describe(options()) :: String.t() @callback describe(options()) :: String.t()