From 1b78d73edf02520d98d15be6970f5695aa3cd8ca Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Tue, 13 Aug 2013 12:28:50 +0200 Subject: [PATCH] SONAR-4573 Remove the hack which leads do display the 'Project Permissions' page on views even if the property 'hasRolePolicy' is not defined on views --- .../app/views/layouts/_menu_resource_settings.html.erb | 5 +---- sonar-server/src/main/webapp/WEB-INF/lib/resourceable.rb | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_menu_resource_settings.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_menu_resource_settings.html.erb index d6362174d1b..fde05bbc14d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_menu_resource_settings.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_menu_resource_settings.html.erb @@ -19,10 +19,7 @@ <% if (is_admin && @project.project?) %>
  • <%= message('project_links.page') -%>
  • <% end %> - <% - # NOTE: we keep "@project.view?" in the test for backward compatibility with the Views plugin - if (is_admin && controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'hasRolePolicy') || @project.view?) - %> + <% if is_admin && controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'hasRolePolicy') %>
  • <%= message('roles.page') -%>
  • <% end %> <% if is_admin && controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'modifiable_history') %> diff --git a/sonar-server/src/main/webapp/WEB-INF/lib/resourceable.rb b/sonar-server/src/main/webapp/WEB-INF/lib/resourceable.rb index edb4a03277d..32513ba6695 100644 --- a/sonar-server/src/main/webapp/WEB-INF/lib/resourceable.rb +++ b/sonar-server/src/main/webapp/WEB-INF/lib/resourceable.rb @@ -53,10 +53,12 @@ module Resourceable qualifier==QUALIFIER_LIB end + # No more used since SonarQube 4.0 and should not be used anymore def view? qualifier==QUALIFIER_VIEW end + # No more used and should not be used def subview? qualifier==QUALIFIER_SUBVIEW end -- 2.39.5