Skip to content

Commit

Permalink
Allow people with edit privileges not to have to enter the password
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSBrown committed May 7, 2020
1 parent de08654 commit 33bd669
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/adventures_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def adventure_params
end

def check_authentication
if @adventure.has_password? && !session[@adventure.title]
if !@adventure.editable_by?(current_user) && (@adventure.has_password? && !session[@adventure.title])
render :authenticate_player
end
end
Expand Down

0 comments on commit 33bd669

Please sign in to comment.