From 29901a50874a01a88e05cdf4d0a4fdb6929a507b Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Thu, 7 Dec 2017 15:31:54 +0100 Subject: [PATCH] Revert "SONAR-10176 Fix query of users having a global permission" This reverts commit f5a38606deffb5155f9ee0898e1130a78202eed6. Was pushed too early by mistake --- .../resources/org/sonar/db/permission/AuthorizationMapper.xml | 2 -- .../java/org/sonar/db/permission/AuthorizationDaoTest.java | 3 --- 2 files changed, 5 deletions(-) diff --git a/server/sonar-db-dao/src/main/resources/org/sonar/db/permission/AuthorizationMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/permission/AuthorizationMapper.xml index 3df9e766e1e..60f105b4ede 100644 --- a/server/sonar-db-dao/src/main/resources/org/sonar/db/permission/AuthorizationMapper.xml +++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/permission/AuthorizationMapper.xml @@ -385,7 +385,6 @@ inner join users u on u.id=ur.user_id where ur.role=#{permission,jdbcType=VARCHAR} - and ur.resource_id is null union @@ -395,7 +394,6 @@ inner join users u on u.id=gu.user_id where gr.role = #{permission,jdbcType=VARCHAR} and - gr.resource_id is null and gr.group_id is not null diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/permission/AuthorizationDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/permission/AuthorizationDaoTest.java index 2e6ba70c1e2..951f8011a03 100644 --- a/server/sonar-db-dao/src/test/java/org/sonar/db/permission/AuthorizationDaoTest.java +++ b/server/sonar-db-dao/src/test/java/org/sonar/db/permission/AuthorizationDaoTest.java @@ -1021,11 +1021,8 @@ public class AuthorizationDaoTest { UserDto user3 = db.users().insertUser(); db.users().insertMember(administratorGroup2, user3); - ComponentDto project = db.components().insertPrivateProject(); - UserDto user4 = db.users().insertUser(); db.users().insertPermissionOnUser(organization1, user4, ADMINISTER_QUALITY_PROFILES); - db.users().insertProjectPermissionOnUser(user4, "admin", project); db.users().insertUser(); List logins = underTest.selectGlobalAdministratorLogins(dbSession); -- 2.39.5