forked from spen/seminar
Fix bug.
This commit is contained in:
parent
5a59677e41
commit
4fa7a17372
|
@ -25,7 +25,7 @@ class Admin::SeminarsController < OrbitAdminController
|
||||||
access_level = OrbitHelper.user_access_level?
|
access_level = OrbitHelper.user_access_level?
|
||||||
if (access_level.nil? || access_level == "user") && (@seminar.organizer_id != current_user.member_profile_id rescue true)
|
if (access_level.nil? || access_level == "user") && (@seminar.organizer_id != current_user.member_profile_id rescue true)
|
||||||
render_401
|
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
|
render_401
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -25,7 +25,7 @@ module Seminar
|
||||||
:link_path=>"new_admin_seminar_path" ,
|
:link_path=>"new_admin_seminar_path" ,
|
||||||
:priority=>2,
|
:priority=>2,
|
||||||
:active_for_action=>{'admin/seminars'=>'new'},
|
:active_for_action=>{'admin/seminars'=>'new'},
|
||||||
:available_for => 'managers'
|
:available_for => 'sub_managers'
|
||||||
context_link 'categories',
|
context_link 'categories',
|
||||||
:link_path=>"admin_module_app_categories_path" ,
|
:link_path=>"admin_module_app_categories_path" ,
|
||||||
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'seminar').id}",
|
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'seminar').id}",
|
||||||
|
@ -35,17 +35,17 @@ module Seminar
|
||||||
:available_for => 'managers'
|
:available_for => 'managers'
|
||||||
context_link 'seminar.set_seminar_items',
|
context_link 'seminar.set_seminar_items',
|
||||||
:link_path=>"admin_seminar_items_path" ,
|
:link_path=>"admin_seminar_items_path" ,
|
||||||
:priority=>3,
|
:priority=>4,
|
||||||
:active_for_action=>{'admin/seminars'=>'seminar_items'},
|
:active_for_action=>{'admin/seminars'=>'seminar_items'},
|
||||||
:available_for => 'managers'
|
:available_for => 'managers'
|
||||||
context_link 'seminar.set_seminar_agreements',
|
context_link 'seminar.set_seminar_agreements',
|
||||||
:link_path=>"admin_seminar_agreements_path" ,
|
:link_path=>"admin_seminar_agreements_path" ,
|
||||||
:priority=>3,
|
:priority=>5,
|
||||||
:active_for_action=>{'admin/seminars'=>'seminar_agreements'},
|
:active_for_action=>{'admin/seminars'=>'seminar_agreements'},
|
||||||
:available_for => 'managers'
|
:available_for => 'managers'
|
||||||
context_link 'seminar.enquiry_for_applicants',
|
context_link 'seminar.enquiry_for_applicants',
|
||||||
:link_path=>"admin_seminar_enquiry_for_applicants_path" ,
|
:link_path=>"admin_seminar_enquiry_for_applicants_path" ,
|
||||||
:priority=>3,
|
:priority=>6,
|
||||||
:active_for_action=>{'admin/seminars'=>'enquiry_for_applicants'},
|
:active_for_action=>{'admin/seminars'=>'enquiry_for_applicants'},
|
||||||
:available_for => 'users'
|
:available_for => 'users'
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue