Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

Commit

Permalink
resolve #663
Browse files Browse the repository at this point in the history
  • Loading branch information
dgoerger committed Jul 10, 2014
1 parent 71aeebd commit 514bc10
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def check_active_admin_permission
end

def check_view_mode
return unless current_user
if current_user.role == 'admin' && current_user.view_mode != 'admin'
flash[:persistent] = "Currently viewing as #{current_user.view_mode} user. You can switch back to your regular view \
#{ActionController::Base.helpers.link_to('below','#view_as')} \
Expand Down

0 comments on commit 514bc10

Please sign in to comment.