Skip to content

Commit

Permalink
Allow custom errors in unauthorized_message
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroenvisser101 committed Jul 16, 2020
1 parent 22edb56 commit f0de230
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/authorization.ex
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ defmodule Rajska.Authorization do

@callback has_user_access?(current_user, scoped_struct, rule) :: boolean()

@callback unauthorized_message(resolution :: Resolution.t()) :: String.t()
@callback unauthorized_message(resolution :: Resolution.t()) ::
Absinthe.Type.Field.error_value()

@callback context_role_authorized?(context, allowed_role :: role) :: boolean()

Expand Down

0 comments on commit f0de230

Please sign in to comment.