Skip to content

Commit f0de230

Browse files
Allow custom errors in unauthorized_message
1 parent 22edb56 commit f0de230

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/authorization.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ defmodule Rajska.Authorization do
2424

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

27-
@callback unauthorized_message(resolution :: Resolution.t()) :: String.t()
27+
@callback unauthorized_message(resolution :: Resolution.t()) ::
28+
Absinthe.Type.Field.error_value()
2829

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

0 commit comments

Comments
 (0)