diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index 1081a82ce..2bcc8d8f6 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -2,7 +2,7 @@ class BoardsController < ApplicationController before_action :require_login, :check_auth before_action :find_course, only: [:create] before_action :set_board, except: [:create] - before_action :teacher_or_admin_allowed + before_action :teacher_allowed def index @boards = @course.boards.includes(messages: [:last_reply, :author]) diff --git a/app/controllers/course_groups_controller.rb b/app/controllers/course_groups_controller.rb index 0e16d1bac..bfdb959b4 100644 --- a/app/controllers/course_groups_controller.rb +++ b/app/controllers/course_groups_controller.rb @@ -2,7 +2,7 @@ class CourseGroupsController < ApplicationController before_action :require_login, :check_auth before_action :set_group, except: [:create] before_action :find_course, only: [:create] - before_action :teacher_or_admin_allowed + before_action :teacher_allowed def create tip_exception("分班名称不能为空") if params[:name].blank? diff --git a/app/controllers/course_second_categories_controller.rb b/app/controllers/course_second_categories_controller.rb index e5c3366cd..2de1637f2 100644 --- a/app/controllers/course_second_categories_controller.rb +++ b/app/controllers/course_second_categories_controller.rb @@ -1,7 +1,7 @@ class CourseSecondCategoriesController < ApplicationController before_action :require_login, :check_auth before_action :set_category - before_action :teacher_or_admin_allowed + before_action :teacher_allowed # 目录重命名 def rename_category