authorization changes

This commit is contained in:
Harry Bomrah 2014-10-20 18:52:52 +08:00
parent d808f23dd9
commit f90d7a4997
1 changed files with 4 additions and 2 deletions

View File

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