Skip to content

Commit

Permalink
Merge pull request #2062 from zz9pzza/issue_3727
Browse files Browse the repository at this point in the history
3727 Return to the restricted work after login
  • Loading branch information
sarken committed Jul 13, 2015
2 parents a8f5dd1 + 8aa4e98 commit 171e299
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controllers/application_controller.rb
Expand Up @@ -368,7 +368,8 @@ def check_ownership_or_admin
# includes a special case for restricted works and series, since we want to encourage people to sign up to read them
def check_visibility
if @check_visibility_of.respond_to?(:restricted) && @check_visibility_of.restricted && User.current_user.nil?
redirect_to login_path(:restricted => true)
store_location
redirect_to login_path(restricted: true)
elsif @check_visibility_of.is_a? Skin
access_denied unless logged_in_as_admin? || current_user_owns?(@check_visibility_of) || @check_visibility_of.official?
else
Expand Down

0 comments on commit 171e299

Please sign in to comment.