diff --git a/app/controllers/git_usage_controller.rb b/app/controllers/git_usage_controller.rb index 4f9a96d6f..0b97fd523 100644 --- a/app/controllers/git_usage_controller.rb +++ b/app/controllers/git_usage_controller.rb @@ -1,6 +1,6 @@ #added by baiyu class GitUsageController < ApplicationController - layout "project_base" + layout "base_projects" def ch_usage end diff --git a/app/controllers/issue_categories_controller.rb b/app/controllers/issue_categories_controller.rb index fb62821d8..68713aa43 100644 --- a/app/controllers/issue_categories_controller.rb +++ b/app/controllers/issue_categories_controller.rb @@ -16,7 +16,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class IssueCategoriesController < ApplicationController - layout "project_base" + layout "base_projects" menu_item :settings model_object IssueCategory before_filter :find_model_object, :except => [:index, :new, :create] diff --git a/app/controllers/organization_controller.rb b/app/controllers/organization_controller.rb index db8295e44..62e6b85f6 100644 --- a/app/controllers/organization_controller.rb +++ b/app/controllers/organization_controller.rb @@ -1,5 +1,5 @@ class OrganizationController < ApplicationController - layout 'project_base' + layout 'base_projects' before_filter :require_admin, :except => [:index] def index diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 6ad450315..e6e93947c 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -438,9 +438,9 @@ class ProjectsController < ApplicationController case params[:role] when '1' @subPage_title = l :label_teacher_list - @members = searchTeacherAndAssistant(@project) + @members = searchTeacherAndAssistant(@project) when '2' - @subPage_title = l :label_student_list + @subPage_title = l :label_student_list @members = searchStudent(@project) else @subPage_title = '' @@ -578,7 +578,7 @@ class ProjectsController < ApplicationController format.api { render_api_ok } end else - render :layout => "project_base" + render :layout => "base_projects" end # hide project in layout @project = nil @@ -586,7 +586,7 @@ class ProjectsController < ApplicationController def show_projects_score respond_to do |format| - format.html { render :layout => "project_base"} + format.html { render :layout => "base_projects"} format.js end end @@ -674,10 +674,10 @@ class ProjectsController < ApplicationController private def memberAccess - # 是课程,则判断当前用户是否参加了课程 - # return 0 if @project.project_type == Project::ProjectType_project - # currentUser = User.current - render_403 unless User.current.member_of?(@project) + # 如果是私有项目,项目成员不对外公开,公开项目成员列表对外公开。 + unless @project.is_public? + render_403 unless User.current.member_of?(@project) + end end def toggleCourse diff --git a/plugins/redmine_code_review/app/controllers/code_review_controller.rb b/plugins/redmine_code_review/app/controllers/code_review_controller.rb index 14c702e1e..421599525 100644 --- a/plugins/redmine_code_review/app/controllers/code_review_controller.rb +++ b/plugins/redmine_code_review/app/controllers/code_review_controller.rb @@ -16,7 +16,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class CodeReviewController < ApplicationController - layout "project_base" + layout "base_projects" unloadable before_filter :find_project, :authorize, :find_user, :find_setting, :find_repository