From 0fd3501f4c950b0fc09ad457cb89bf9baa1de0e6 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Thu, 24 Aug 2017 20:31:51 +0800 Subject: [PATCH] fix for announcement is pro --- app/controllers/announcements_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index 13938d6..fe121cf 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -290,7 +290,11 @@ class AnnouncementsController < ApplicationController access_level = OrbitHelper.user_access_level? if !announcement.approved && (access_level != "manager" && access_level != "admin") - if !(access_level == "sub_manager" && AnnouncementSetting.first.approvers.include?(OrbitHelper.current_user.id.to_s)) + 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