Skip to content

Commit

Permalink
Refactor Gate to set response status to 403 when denying authorization
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmancuso committed Oct 23, 2024
1 parent f30e5b5 commit 93a9351
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/masonite/authorization/Gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def inspect(self, permission, *args):
if boolean_result:
return AuthorizationResponse.allow()
else:
self.application.make("response").status(403)
return AuthorizationResponse.deny()

def check(self, permission, *args):
Expand Down

0 comments on commit 93a9351

Please sign in to comment.