Fix bug. #8

Merged
chiu merged 1 commits from 123/seminar:master into master 2023-03-17 07:59:38 +00:00
2 changed files with 5 additions and 5 deletions

View File

@ -25,7 +25,7 @@ class Admin::SeminarsController < OrbitAdminController
access_level = OrbitHelper.user_access_level?
if (access_level.nil? || access_level == "user") && (@seminar.organizer_id != current_user.member_profile_id rescue true)
render_401
elsif access_level == "sub_manager" && @seminar && !(OrbitHelper.user_can_edit(@seminar))
elsif access_level == "sub_manager" && @seminar && !(OrbitHelper.user_can_edit?(@seminar))
render_401
end
end

View File

@ -25,7 +25,7 @@ module Seminar
:link_path=>"new_admin_seminar_path" ,
:priority=>2,
:active_for_action=>{'admin/seminars'=>'new'},
:available_for => 'managers'
:available_for => 'sub_managers'
context_link 'categories',
:link_path=>"admin_module_app_categories_path" ,
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'seminar').id}",
@ -35,17 +35,17 @@ module Seminar
:available_for => 'managers'
context_link 'seminar.set_seminar_items',
:link_path=>"admin_seminar_items_path" ,
:priority=>3,
:priority=>4,
:active_for_action=>{'admin/seminars'=>'seminar_items'},
:available_for => 'managers'
context_link 'seminar.set_seminar_agreements',
:link_path=>"admin_seminar_agreements_path" ,
:priority=>3,
:priority=>5,
:active_for_action=>{'admin/seminars'=>'seminar_agreements'},
:available_for => 'managers'
context_link 'seminar.enquiry_for_applicants',
:link_path=>"admin_seminar_enquiry_for_applicants_path" ,
:priority=>3,
:priority=>6,
:active_for_action=>{'admin/seminars'=>'enquiry_for_applicants'},
:available_for => 'users'
end