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