管理员查看user_projects 课程项目混淆的问题
This commit is contained in:
parent
31804b3d45
commit
5d8edb218f
|
@ -65,7 +65,7 @@ class UsersController < ApplicationController
|
|||
def user_projects
|
||||
|
||||
if User.current.admin?
|
||||
@memberships = @user.memberships.all
|
||||
@memberships = @user.memberships.all(conditions: "projects.project_type = #{Project::ProjectType_project}")
|
||||
else
|
||||
cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1"
|
||||
@memberships = @user.memberships.all(:conditions => cond)
|
||||
|
|
Loading…
Reference in New Issue