Skip to content

Commit

Permalink
refactor: Increases funciton clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaudouinjr committed Sep 14, 2020
1 parent 711aeea commit 971dd0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/manage/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def logged_in
end

def require_director
return redirect_to manage_root_path unless !current_user.staff? || current_user.try(:director?)
return redirect_to manage_root_path if current_user.staff? && !current_user.try(:director?)
return redirect_to root_path unless current_user.try(:director?)
end

Expand Down

0 comments on commit 971dd0a

Please sign in to comment.