Skip to content

Commit

Permalink
Merge pull request #2711 from osulp/patch/privateEmbargoVisibility
Browse files Browse the repository at this point in the history
current_user does not exist here and is unnecessary
  • Loading branch information
lamtu1 authored Feb 18, 2025
2 parents 7944ca9 + ff5c336 commit 76794a6
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 76794a6

Please sign in to comment.