From f90d7a499760aa4057cbf4af69f00ae8689d99fb Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Mon, 20 Oct 2014 18:52:52 +0800 Subject: [PATCH] authorization changes --- app/helpers/admin/announcements_helper.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/helpers/admin/announcements_helper.rb b/app/helpers/admin/announcements_helper.rb index cf3ace5..26cfa8e 100644 --- a/app/helpers/admin/announcements_helper.rb +++ b/app/helpers/admin/announcements_helper.rb @@ -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