|
|
@ -29,6 +29,7 @@ class ProjectsController < ApplicationController
|
|
|
|
# menu_item :share, :only => :share
|
|
|
|
# menu_item :share, :only => :share
|
|
|
|
skip_before_filter :verify_authenticity_token, :only => [:training_task_status]
|
|
|
|
skip_before_filter :verify_authenticity_token, :only => [:training_task_status]
|
|
|
|
skip_before_filter :check_if_login_required, :only => [:training_task_status]
|
|
|
|
skip_before_filter :check_if_login_required, :only => [:training_task_status]
|
|
|
|
|
|
|
|
before_filter :local_exam
|
|
|
|
before_filter :check_authentication
|
|
|
|
before_filter :check_authentication
|
|
|
|
before_filter :find_project, :except => [ :index, :search,:list, :new, :create, :copy, :statistics, :new_join, :course, :enterprise_course, :course_enterprise,
|
|
|
|
before_filter :find_project, :except => [ :index, :search,:list, :new, :create, :copy, :statistics, :new_join, :course, :enterprise_course, :course_enterprise,
|
|
|
|
:view_homework_attaches,:join_project, :project_home, :training_execute, :training_task_status]
|
|
|
|
:view_homework_attaches,:join_project, :project_home, :training_execute, :training_task_status]
|
|
|
@ -37,6 +38,7 @@ class ProjectsController < ApplicationController
|
|
|
|
before_filter :require_admin, :only => [ :copy, :unarchive, :calendar]
|
|
|
|
before_filter :require_admin, :only => [ :copy, :unarchive, :calendar]
|
|
|
|
before_filter :require_admin_or_manager, :only => [ :destroy]
|
|
|
|
before_filter :require_admin_or_manager, :only => [ :destroy]
|
|
|
|
before_filter :file
|
|
|
|
before_filter :file
|
|
|
|
|
|
|
|
before_filter :local_exam
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 除非项目内人员,不可查看成员, TODO: 完了写报表里去
|
|
|
|
# 除非项目内人员,不可查看成员, TODO: 完了写报表里去
|
|
|
@ -738,6 +740,12 @@ class ProjectsController < ApplicationController
|
|
|
|
def file
|
|
|
|
def file
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def local_exam
|
|
|
|
|
|
|
|
if LocalSetting.first.try(:exam) && !User.current.admin?
|
|
|
|
|
|
|
|
render_403
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def statistics
|
|
|
|
def statistics
|
|
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|