diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index a3b20c598..bab8a4189 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -552,7 +552,7 @@ class CoursesController < ApplicationController def change_member_role tip_exception("请至少选择一个角色") if params[:roles].blank? tip_exception("不能具有老师、助教两种角色") if params[:roles].include?("PROFESSOR") && params[:roles].include?("ASSISTANT_PROFESSOR") - tip_exception("管理员不能切换为助教或老师") if @user_course_identity == Course::CREATOR && + tip_exception("管理员不能切换为助教或老师") if current_user.id == @course.tea_id && (params[:roles].include?("PROFESSOR") || params[:roles].include?("ASSISTANT_PROFESSOR")) course_members = @course.course_members.where(user_id: params[:user_id])