From 4496c49b647ec614c37c2e3fefa9ed41f4b8c8b0 Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Tue, 9 Aug 2011 22:53:06 +0200 Subject: [PATCH] SONAR-2621 Profile changelog should be accessible by anonymous users --- .../webapp/WEB-INF/app/controllers/profiles_controller.rb | 2 +- .../main/webapp/WEB-INF/app/views/profiles/_tabs.html.erb | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb index 07083be7d88..1a4c8f280cd 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb @@ -24,7 +24,7 @@ class ProfilesController < ApplicationController verify :method => :post, :only => ['create', 'delete', 'copy', 'set_as_default', 'restore', 'set_projects', 'rename', 'change_parent'], :redirect_to => { :action => 'index' } # the backup action is allow to non-admin users : see http://jira.codehaus.org/browse/SONAR-2039 - before_filter :admin_required, :except => [ 'index', 'show', 'projects', 'permalinks', 'export', 'backup', 'inheritance' ] + before_filter :admin_required, :except => [ 'index', 'show', 'permalinks', 'export', 'backup', 'inheritance' ] # # diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/_tabs.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/_tabs.html.erb index 03015f5d72a..a614e8c32a9 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/_tabs.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/_tabs.html.erb @@ -1,6 +1,7 @@ -<%= +<% new_tab = nil unless defined?(:new_tab) selected_tab = nil unless defined?(:selected_tab) + is_admin=has_role?(:admin) %>