Skip to content

Commit

Permalink
Remove call to #current_user
Browse files Browse the repository at this point in the history
  • Loading branch information
CGillen committed Feb 18, 2025
1 parent 7944ca9 commit ff5c336
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def redirect_if_restricted
flash[:alert] = ''

# First we check if the user can see the work or fileset
return unless current_user.cannot?(:read, curation_concern) && (!visible_under_embargo(curation_concern) || curation_concern.visibility == 'authenticated')
return unless cannot?(:read, curation_concern) && (!visible_under_embargo(curation_concern) || curation_concern.visibility == 'authenticated')

# Next we check if user got here specifically from the homepage. This means they got redirected and clicked the login link.
return if request.referrer.to_s == "https://#{ENV.fetch('SCHOLARSARCHIVE_URL_HOST')}/"
Expand Down

0 comments on commit ff5c336

Please sign in to comment.