From 05e72dcc7b7f3996386a7c8c4a955dd39e62637a Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Thu, 1 Sep 2016 14:17:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=99=E5=B8=88=E4=BF=AE=E6=94=B9=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E8=A7=92=E8=89=B2=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/courses.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/api/mobile/apis/courses.rb b/app/api/mobile/apis/courses.rb index a42ebd470..cbf8f4986 100644 --- a/app/api/mobile/apis/courses.rb +++ b/app/api/mobile/apis/courses.rb @@ -579,13 +579,16 @@ module Mobile end #7教辅 9教师 10学生 - if c.tea_id == params[:user_id] || roles_id.length <= 0 || rolesids.include?(10) + if c.tea_id == params[:user_id] || roles_id.length <= 0 present :status, -1 present :message,"修改失败" - else + elsif rolesids.include?(3) || rolesids.include?(7) || rolesids.include?(9) cs = CoursesService.new status = cs.modify_user_course_role params,roles_id present :status, status + else + present :status, -1 + present :message,"修改失败" end end