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' ]
#
#
-<%=
+<%
new_tab = nil unless defined?(:new_tab)
selected_tab = nil unless defined?(:selected_tab)
+ is_admin=has_role?(:admin)
%>
<ul class="tabs">
<li>
<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>