This commit is contained in:
BoHung Chiu 2021-11-18 19:33:41 +08:00
parent 1a988ca94d
commit 72a5ed3360
1 changed files with 2 additions and 0 deletions

View File

@ -31,6 +31,7 @@ class Admin::SeminarsController < OrbitAdminController
end
def check_permission_for_seminar
OrbitHelper.set_params(params,current_user)
OrbitHelper.set_this_module_app("seminar")
access_level = OrbitHelper.user_access_level?
if (access_level.nil? || access_level == "user")
unless (@seminar.reviewer_ids.include?(current_user.member_profile_id.to_s) rescue false) || (@seminar.organizer_id == current_user.member_profile_id rescue false)
@ -391,6 +392,7 @@ class Admin::SeminarsController < OrbitAdminController
@seminars = search_data(@seminars,[:title]).page(params[:page]).per(10)
OrbitHelper.set_params(params,current_user)
OrbitHelper.set_this_module_app("seminar")
@access_level = OrbitHelper.user_access_level?
@can_edit = true
if @access_level == "user" || @access_level.nil?