diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2016-01-13 14:34:47 +0100 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2016-01-13 14:34:47 +0100 |
commit | bdadbd0391944ec43d2bee8d499a99e6b0057bb7 (patch) | |
tree | d05a2f38c191f838dd17ce870daeec66e05e1a28 /server | |
parent | 0242e1da3fea5a96a9f0632156b1cacdd89b9ace (diff) | |
download | sonarqube-bdadbd0391944ec43d2bee8d499a99e6b0057bb7.tar.gz sonarqube-bdadbd0391944ec43d2bee8d499a99e6b0057bb7.zip |
SONAR-7135 WS api/measures/component_tree fix permissions and IT
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-server/src/main/java/org/sonar/server/measure/ws/ComponentTreeDataLoader.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/measure/ws/ComponentTreeDataLoader.java b/server/sonar-server/src/main/java/org/sonar/server/measure/ws/ComponentTreeDataLoader.java index bc84c432c9d..9a967c66413 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/measure/ws/ComponentTreeDataLoader.java +++ b/server/sonar-server/src/main/java/org/sonar/server/measure/ws/ComponentTreeDataLoader.java @@ -333,9 +333,9 @@ public class ComponentTreeDataLoader { private void checkPermissions(ComponentDto baseComponent) { String projectUuid = firstNonNull(baseComponent.projectUuid(), baseComponent.uuid()); - if (!userSession.hasGlobalPermission(GlobalPermissions.SYSTEM_ADMIN) && - !userSession.hasProjectPermissionByUuid(UserRole.ADMIN, projectUuid) && - !userSession.hasProjectPermissionByUuid(UserRole.USER, projectUuid)) { + if (!userSession.hasPermission(GlobalPermissions.SYSTEM_ADMIN) && + !userSession.hasComponentUuidPermission(UserRole.ADMIN, projectUuid) && + !userSession.hasComponentUuidPermission(UserRole.USER, projectUuid)) { throw insufficientPrivilegesException(); } } |