From addf3604ec53e2c58ee94dad819f5fd7eabf421b Mon Sep 17 00:00:00 2001 From: yutao <283765470@qq.com> Date: Thu, 16 Jul 2015 16:58:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index e22b02792..dd43e3e5b 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -452,7 +452,7 @@ class UsersController < ApplicationController else if @user.user_extensions!=nil && @user.user_extensions.identity == 0 #看老师 query = query.joins("join member_roles r on m.id = r.member_id") - query = query.where("r.role_id in(7,9)") + query = query.where("r.role_id in(3,7,9)") end query = query.where(Course.table_name+".is_public = 1") # TODO or exists (select 1 from courses c2,members m2 where c2.id=m2.course_id and c2.id=#{Course.table_name}.id and m2.user_id= User.current.id)