From a3230075aba7d47e3528426a9bc861123346a751 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 24 Apr 2019 11:05:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E8=BA=AB=E4=BB=BD=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E6=96=B0=E5=BB=BA=E8=AF=BE=E5=A0=82=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 57d57938..b65f2219 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -1481,14 +1481,14 @@ class CoursesController < ApplicationController def new if User.current.login? - @course_type = params[:course_type] ||= params[:course] - @issue_custom_fields = IssueCustomField.sorted.all - @trackers = Tracker.sorted.all - @course = Course.new - @course.safe_attributes = params[:course] - @syllabus = Syllabus.where("id = #{params[:syllabus_id].to_i}").first if params[:syllabus_id] - # month = Time.now.month - render :layout => 'base_edu' + if User.current.user_extensions.try(:identity) == 1 + render_403 + else + @course = Course.new + @course.safe_attributes = params[:course] + # month = Time.now.month + render :layout => 'base_edu' + end else redirect_to signin_url end