fix for announcement is pro
This commit is contained in:
parent
7daf685f2b
commit
0fd3501f4c
|
@ -290,9 +290,13 @@ class AnnouncementsController < ApplicationController
|
|||
access_level = OrbitHelper.user_access_level?
|
||||
|
||||
if !announcement.approved && (access_level != "manager" && access_level != "admin")
|
||||
if AnnouncementSetting.is_pro?
|
||||
if !(access_level == "sub_manager" && AnnouncementSetting.first.approvers.include?(OrbitHelper.current_user.id.to_s))
|
||||
return {}
|
||||
end
|
||||
elsif access_level != "sub_manager"
|
||||
return {}
|
||||
end
|
||||
end
|
||||
|
||||
return {} if announcement.category.disable
|
||||
|
|
Loading…
Reference in New Issue