authorization changes
This commit is contained in:
parent
d808f23dd9
commit
f90d7a4997
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue