authorization changes

This commit is contained in:
Harry Bomrah 2014-10-20 18:53:31 +08:00
parent b1c6bcbf9b
commit 0fd7e69981
1 changed files with 4 additions and 2 deletions

View File

@ -26,10 +26,12 @@ module Admin::AnnouncementsHelper
end
def load_access_level
if current_user.is_admin?
if (current_user.is_admin? rescue false)
@access_level = "admin"
elsif current_user.is_manager?(@module_app)
elsif (current_user.is_manager?(@module_app) rescue false)
@access_level = "manager"
else
@access_level = "users"
end
end