aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2011-08-09 23:14:46 +0200
committersimonbrandhof <simon.brandhof@gmail.com>2011-08-09 23:14:46 +0200
commitb75be91784305075e3c2bc00312dcb67377fef56 (patch)
tree6eb839a5791032fe34cbd2cdd7b5dc9db5356ca0
parent4496c49b647ec614c37c2e3fefa9ed41f4b8c8b0 (diff)
downloadsonarqube-b75be91784305075e3c2bc00312dcb67377fef56.tar.gz
sonarqube-b75be91784305075e3c2bc00312dcb67377fef56.zip
SONAR-2621 Profile changelog should be accessible by anonymous users
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/profiles/_tabs.html.erb5
2 files changed, 1 insertions, 6 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 1a4c8f280cd..2e27aeb9c4b 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', 'permalinks', 'export', 'backup', 'inheritance' ]
+ before_filter :admin_required, :only => ['create', 'delete', 'set_as_default', 'copy', 'restore', 'change_parent', 'set_projects', 'rename']
#
#
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 a614e8c32a9..0ea41f79e16 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,7 +1,6 @@
<%
new_tab = nil unless defined?(:new_tab)
selected_tab = nil unless defined?(:selected_tab)
- is_admin=has_role?(:admin)
%>
<ul class="tabs">
<li>
@@ -10,22 +9,18 @@
<li>
<a href="<%= url_for :controller => 'alerts', :action => 'index', :id => @profile.id -%>" <%= "class='selected'" if selected_tab=='Alerts' -%>><%= message('alerts') -%></a>
</li>
- <% if is_admin %>
<li>
<a href="<%= url_for :controller => 'profiles', :action => 'projects', :id => @profile.id -%>" <%= "class='selected'" if selected_tab=='Projects' -%>><%= message('projects') -%></a>
</li>
- <% end %>
<li>
<a href="<%= url_for :controller => 'profiles', :action => 'permalinks', :id => @profile.id -%>" <%= "class='selected'" if selected_tab=='Permalinks' -%>><%= message('permalinks') -%></a>
</li>
<li>
<a href="<%= url_for :controller => 'profiles', :action => 'inheritance', :id => @profile.id -%>" <%= "class='selected'" if selected_tab=='inheritance' -%>><%= message('quality_profiles.profile_inheritance') -%></a>
</li>
- <% if is_admin %>
<li>
<a href="<%= url_for :controller => 'profiles', :action => 'changelog', :id => @profile.id -%>" <%= "class='selected'" if selected_tab=='changelog' -%>><%= message('changelog') -%></a>
</li>
- <% end %>
<% if new_tab %>
<li>
<a href="#" class='selected'><%= new_tab -%></a>