]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4131 managing roles on sub-views should not be allowed
authorJulien Lancelot <julien.lancelot@gmail.com>
Tue, 28 May 2013 12:29:11 +0000 (14:29 +0200)
committerJulien Lancelot <julien.lancelot@gmail.com>
Tue, 28 May 2013 12:29:22 +0000 (14:29 +0200)
sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_menu_resource_settings.html.erb

index 20533610739521a008bf2fc2951de16bc714d955..4899124412f6caaded9cba7b49a85b40846f88f2 100644 (file)
@@ -34,7 +34,7 @@ class RolesController < ApplicationController
   def projects
     # for backward-compatibility with versions of views plugin that do not depend on sonar 3.0
     if java_facade.hasPlugin('views')
-      @qualifiers = (['VW', 'SVW'] + java_facade.getQualifiersWithProperty('hasRolePolicy').to_a).compact.uniq
+      @qualifiers = (['VW'] + java_facade.getQualifiersWithProperty('hasRolePolicy').to_a).compact.uniq
     else
       @qualifiers = java_facade.getQualifiersWithProperty('hasRolePolicy')
     end
index 411ceca89d01de2b8106bc9ebc7673e25e13c668..cbf2e5c899ba2452139f8c336a604fb8d7057aed 100644 (file)
          <li><a href="<%= ApplicationController.root_context -%>/project/links/<%= @project.id -%>"><%= message('project_links.page') -%></a></li>
       <% end %>
       <%
-         # NOTE: we keep "@project.view? || @project.subview?" in the test for backward compatibility with the Views plugin
-         if (is_admin && controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'hasRolePolicy') || @project.view? || @project.subview?)
+         # 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?)
       %>
       <li><a href="<%= ApplicationController.root_context -%>/project_roles/index/<%= @project.id -%>"><%= message('roles.page') -%></a></li>
       <% end %>
       <%
-         # NOTE: we keep "@project.view? || @project.subview?" in the test for backward compatibility with the Views plugin
+         # NOTE: we keep "@project.view?" in the test for backward compatibility with the Views plugin
          if (is_admin && controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'modifiable_history') || @project.view?)
       %>
         <li><a href="<%= ApplicationController.root_context -%>/project/history/<%= @project.id -%>"><%= message('project_history.page') -%></a></li>