Request.Validator behaviour (RequestValidator v0.3.1) View Source
Link to this section Summary
Callbacks
Determine if the user is authorized to make this request.
Get the validation rules that apply to the request.
Link to this section Callbacks
Specs
authorize(Plug.Conn.t()) :: boolean()
Determine if the user is authorized to make this request.
def authorize(conn) do
user(conn).is_admin
end
Specs
rules(Plug.Conn.t()) :: Norm.Core.Schema.t()
Get the validation rules that apply to the request.