]> source.dussan.org Git - sonarqube.git/commitdiff
Revert "SONAR-10176 Fix query of users having a global permission"
authorJulien HENRY <julien.henry@sonarsource.com>
Thu, 7 Dec 2017 14:31:54 +0000 (15:31 +0100)
committerJulien HENRY <julien.henry@sonarsource.com>
Thu, 7 Dec 2017 14:31:54 +0000 (15:31 +0100)
This reverts commit f5a38606deffb5155f9ee0898e1130a78202eed6.

Was pushed too early by mistake

server/sonar-db-dao/src/main/resources/org/sonar/db/permission/AuthorizationMapper.xml
server/sonar-db-dao/src/test/java/org/sonar/db/permission/AuthorizationDaoTest.java

index 3df9e766e1ebccf1e82716b426f897d2d7fc544b..60f105b4ede4b6176d5df5d6cf3ff7cb790621c1 100644 (file)
     inner join users u on u.id=ur.user_id
     where
     ur.role=#{permission,jdbcType=VARCHAR}
-    and ur.resource_id is null
 
     union
 
     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
   </select>
 
index 2e6ba70c1e265819c29e5c36c3869353498983e1..951f8011a034d9424446e45218a04d8e82d08cc4 100644 (file)
@@ -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<String> logins = underTest.selectGlobalAdministratorLogins(dbSession);