This commit is contained in:
z9hang 2014-05-28 14:17:53 +08:00
commit eb0e149ac7
1 changed files with 1 additions and 1 deletions

View File

@ -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)