Skip to content

Commit

Permalink
Fix SAR not returning 403/401 correctly (#2274)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thource authored Jun 10, 2024
1 parent f14e7d2 commit 1c79faf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/subject_access_requests_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def show
# Overrides parent due to endpoint-specific roles
def verify_token
unless token.valid_token_with_scope?('read', role: SAR_ROLE)
if token.valid_token_with_scope?('read', role: '')
if token.valid_token_with_scope?('read')
render_error("Missing role: #{SAR_ROLE}", 1, 403)
else
render_error('Valid authorisation token required', 1, 401)
Expand Down

0 comments on commit 1c79faf

Please sign in to comment.