aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver-auth
diff options
context:
space:
mode:
authorLéo Geoffroy <leo.geoffroy@sonarsource.com>2023-07-10 16:52:59 +0200
committersonartech <sonartech@sonarsource.com>2023-07-10 20:02:56 +0000
commit9b9c60eda5772ab10d6367a523d5f9238b9202a6 (patch)
tree96d7cafc1918e23a5aed2c812a40631dd600c6eb /server/sonar-webserver-auth
parentb5f6bf8a1af9cb95634ad1909fdee71c8e664a42 (diff)
downloadsonarqube-9b9c60eda5772ab10d6367a523d5f9238b9202a6.tar.gz
sonarqube-9b9c60eda5772ab10d6367a523d5f9238b9202a6.zip
SONAR-19850 Fix permissions on tests
Diffstat (limited to 'server/sonar-webserver-auth')
-rw-r--r--server/sonar-webserver-auth/src/testFixtures/java/org/sonar/server/tester/UserSessionRule.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/sonar-webserver-auth/src/testFixtures/java/org/sonar/server/tester/UserSessionRule.java b/server/sonar-webserver-auth/src/testFixtures/java/org/sonar/server/tester/UserSessionRule.java
index b5a9a32cf0a..6f9daa71c4a 100644
--- a/server/sonar-webserver-auth/src/testFixtures/java/org/sonar/server/tester/UserSessionRule.java
+++ b/server/sonar-webserver-auth/src/testFixtures/java/org/sonar/server/tester/UserSessionRule.java
@@ -200,6 +200,11 @@ public class UserSessionRule implements TestRule, UserSession {
return this;
}
+ public UserSessionRule addPortfolioPermission(String projectPermission, ComponentDto... components) {
+ ensureAbstractMockUserSession().addProjectPermission(projectPermission, components);
+ return this;
+ }
+
public UserSessionRule addProjectBranchMapping(String projectUuid, ComponentDto... branchComponents) {
ensureAbstractMockUserSession().addProjectBranchMapping(projectUuid, branchComponents);
return this;