Added a rule for submanager to allow to edit announcement once authorized
This commit is contained in:
parent
44cd8854a9
commit
d3565daef4
|
@ -64,7 +64,9 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
|||
# GET /bulletins/1/edit
|
||||
def edit
|
||||
@bulletin = Bulletin.find(params[:id])
|
||||
if !(is_manager? || is_admin?)
|
||||
is_authorized_sub_manager = @bulletin.category.auth_sub_manager.authorized_user_ids rescue nil
|
||||
|
||||
if !(is_manager? || is_admin? || is_authorized_sub_manager.include?(current_user.id))
|
||||
redirect_to :action => :index
|
||||
else
|
||||
# @summary_variable = @bulletin.summary_variable
|
||||
|
|
Loading…
Reference in New Issue