|
|
@ -44,7 +44,7 @@ class Users::ShixunService
|
|
|
|
def user_policy_filter(relations)
|
|
|
|
def user_policy_filter(relations)
|
|
|
|
# 只有自己或者管理员才有过滤筛选及查看全部状态下实训功能
|
|
|
|
# 只有自己或者管理员才有过滤筛选及查看全部状态下实训功能
|
|
|
|
if self_or_admin?
|
|
|
|
if self_or_admin?
|
|
|
|
relations = relations.where.not(status: -1)
|
|
|
|
relations = relations.where.not(status: -1).where(hidden: false)
|
|
|
|
status_filter(relations)
|
|
|
|
status_filter(relations)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
relations.where(status: [2, 3], hidden: false)
|
|
|
|
relations.where(status: [2, 3], hidden: false)
|
|
|
|