forked from spen/seminar
Merge branch 'master' into 'master'
Fix authorized bug. See merge request spen/seminar!26
This commit is contained in:
commit
2160933f6c
|
@ -21,9 +21,12 @@ class Admin::SeminarsController < OrbitAdminController
|
|||
end
|
||||
def check_manager_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") && (@seminar.organizer_id != current_user.member_profile_id rescue true)
|
||||
render_401
|
||||
elsif access_level == "sub_manager" && @seminar && !(OrbitHelper.user_can_edit(@seminar))
|
||||
render_401
|
||||
end
|
||||
end
|
||||
def check_permission_for_seminar
|
||||
|
|
Loading…
Reference in New Issue