|
|
|
@ -41,6 +41,8 @@ class Users::ShixunService
|
|
|
|
|
|
|
|
|
|
def user_policy_filter(relations)
|
|
|
|
|
# 只有自己或者管理员才有过滤筛选及查看全部状态下实训功能
|
|
|
|
|
Rails.logger.info("self_or_admin?: #{self_or_admin?}")
|
|
|
|
|
Rails.logger.info("user: #{user.id}")
|
|
|
|
|
if self_or_admin?
|
|
|
|
|
relations = relations.where.not(status: -1)
|
|
|
|
|
status_filter(relations)
|
|
|
|
|