diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2016-11-15 15:20:54 +0100 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2016-11-15 17:09:09 +0100 |
commit | 8c933019b0404716488e8c919c2b7571a425e9ee (patch) | |
tree | 933ad227b56f85725e6fe8851d242f82fe2061d1 /sonar-db | |
parent | 7fc0669b944f8d07538352bab71e6cd00e6c7bc3 (diff) | |
download | sonarqube-8c933019b0404716488e8c919c2b7571a425e9ee.tar.gz sonarqube-8c933019b0404716488e8c919c2b7571a425e9ee.zip |
Project admin permission is not considered as a System Admin
Diffstat (limited to 'sonar-db')
-rw-r--r-- | sonar-db/src/main/resources/org/sonar/db/permission/AuthorizationMapper.xml | 1 | ||||
-rw-r--r-- | sonar-db/src/test/java/org/sonar/db/permission/AuthorizationDaoTest.java | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/sonar-db/src/main/resources/org/sonar/db/permission/AuthorizationMapper.xml b/sonar-db/src/main/resources/org/sonar/db/permission/AuthorizationMapper.xml index 6c132aeb434..d5e441bcbce 100644 --- a/sonar-db/src/main/resources/org/sonar/db/permission/AuthorizationMapper.xml +++ b/sonar-db/src/main/resources/org/sonar/db/permission/AuthorizationMapper.xml @@ -28,6 +28,7 @@ where ur.organization_uuid=#{organizationUuid,jdbcType=VARCHAR} and ur.user_id=#{userId,jdbcType=BIGINT} + and ur.resource_id is null </select> <select id="selectOrganizationPermissionsOfAnonymous" parameterType="map" resultType="string"> diff --git a/sonar-db/src/test/java/org/sonar/db/permission/AuthorizationDaoTest.java b/sonar-db/src/test/java/org/sonar/db/permission/AuthorizationDaoTest.java index 9f213a99fbe..42adf47bd9a 100644 --- a/sonar-db/src/test/java/org/sonar/db/permission/AuthorizationDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/permission/AuthorizationDaoTest.java @@ -72,8 +72,10 @@ public class AuthorizationDaoTest { */ @Test public void selectOrganizationPermissions_for_logged_in_user() { + ComponentDto project = db.components().insertProject(); db.users().insertMember(group1, user); db.users().insertPermissionOnUser(org, user, "perm1"); + db.users().insertProjectPermissionOnUser(org, user, "perm42", project); db.users().insertPermissionOnGroup(group1, "perm2"); db.users().insertPermissionOnAnyone(org, "perm3"); |