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