Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
eb0e149ac7
|
@ -65,7 +65,7 @@ class UsersController < ApplicationController
|
||||||
def user_projects
|
def user_projects
|
||||||
|
|
||||||
if User.current.admin?
|
if User.current.admin?
|
||||||
@memberships = @user.memberships.all
|
@memberships = @user.memberships.all(conditions: "projects.project_type = #{Project::ProjectType_project}")
|
||||||
else
|
else
|
||||||
cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1"
|
cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1"
|
||||||
@memberships = @user.memberships.all(:conditions => cond)
|
@memberships = @user.memberships.all(:conditions => cond)
|
||||||
|
|
Loading…
Reference in New Issue