Merge remote-tracking branch 'origin/develop' into develop

dev_home
杨树明 5 years ago
commit 35bcb1bce0

@ -54,6 +54,7 @@ class GitsController < ApplicationController
uid_logger("git start auth: systemuser is #{system_user.try(:login)}")
if shixun.present?
logger.info("#######{system_user.manager_of_shixun?(shixun)}")
if system_user.present? && system_user.manager_of_shixun?(shixun)
result = true
else

@ -331,6 +331,7 @@ class User < ApplicationRecord
# 实训管理员实训合作者、admin
def manager_of_shixun?(shixun)
logger.info("############id: #{id}")
shixun.shixun_members.exists?(role: [1,2], user_id: id) || admin? || business?
end

Loading…
Cancel
Save