Returning same auth message from Policy as in Middleware #2002
Unanswered
lucianobosco
asked this question in
Q&A
Replies: 1 comment
-
I figured out that |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When a restriction is done through route middleware, the returning message specifies the missing permission:
Response:
User does not have the right permissions. Necessary permissions are note_edit
Now I need to use a more complex authorization by implementing a
Policy
but in this case, the returned message is
This action is unauthorized.
I'm wondering, how can I get the returned message from
Policy
as it looks from themiddleware
?I tried by adding an exception in
Handler.php
but no luck so farBeta Was this translation helpful? Give feedback.
All reactions