From: Jean-Baptiste Vilain Date: Wed, 17 Jul 2013 14:07:06 +0000 (+0200) Subject: SONAR-4454 Make it possible to apply a permission template to a single project X-Git-Tag: 3.7~75 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a9e0eac06dbc4893bc4e2aea9f0ec93afade52a9;p=sonarqube.git SONAR-4454 Make it possible to apply a permission template to a single project --- diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties index 29a875ae924..3660170fa62 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties @@ -2259,7 +2259,8 @@ projects_role.user.desc=Ability to browse the measures and to create/edit issues projects_role.codeviewer=Code Viewers projects_role.codeviewer.desc=Ability to view the source code of the project. projects_role.bulk_change=Bulk Change -projects_role.apply_template.form.title=Apply permission template +projects_role.apply_template=Apply permission template +projects_role.apply_template_to_xxx=Apply permission template to {0} projects_role.no_projects=There are currently no results to apply the permission template to. @@ -2281,6 +2282,7 @@ permission_template.update_template=Update permission_template.edit_permissions=Edit permissions permission_template.update_permissions=Save permission_template.no_results=No template to display +permission_template.set_default_templates=Set default templates #------------------------------------------------------------------------------ diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb index 5fb870f2d37..dd144499d78 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb @@ -78,7 +78,7 @@ class RolesController < ApplicationController # GET /roles/apply_template_form?projects=&qualifier= def apply_template_form @permission_templates = Internal.permission_templates.selectAllPermissionTemplates().collect {|pt| [pt.name, pt.key]} - render :partial => 'apply_template_form', :locals => {:components => params[:projects], :qualifier => params[:qualifier] || 'TRK'} + render :partial => 'apply_template_form', :locals => {:components => params[:projects], :project_name => params[:project_name], :qualifier => params[:qualifier] || 'TRK'} end # POST /roles/apply_template?criteria diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/roles/_apply_template_form.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/roles/_apply_template_form.html.erb index 659ff4d47ef..b7c04c22d06 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/roles/_apply_template_form.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/roles/_apply_template_form.html.erb @@ -4,7 +4,11 @@ <% end %>