aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver-auth
diff options
context:
space:
mode:
authorLéo Geoffroy <leo.geoffroy@sonarsource.com>2023-06-29 17:44:33 +0200
committersonartech <sonartech@sonarsource.com>2023-06-30 20:03:15 +0000
commit3479f361165ec82d9e5ccff925c68f12e4315858 (patch)
tree390151f9303dde12cedc4d45760fbee87aef8bc7 /server/sonar-webserver-auth
parent2037ea2fbc4119b820359185604b085caaa59255 (diff)
downloadsonarqube-3479f361165ec82d9e5ccff925c68f12e4315858.tar.gz
sonarqube-3479f361165ec82d9e5ccff925c68f12e4315858.zip
SONAR-19558 Update rest of test for sonar-db-dao
Diffstat (limited to 'server/sonar-webserver-auth')
-rw-r--r--server/sonar-webserver-auth/src/it/java/org/sonar/server/user/ServerUserSessionIT.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/sonar-webserver-auth/src/it/java/org/sonar/server/user/ServerUserSessionIT.java b/server/sonar-webserver-auth/src/it/java/org/sonar/server/user/ServerUserSessionIT.java
index dcbf92665f9..1e0fddad7e6 100644
--- a/server/sonar-webserver-auth/src/it/java/org/sonar/server/user/ServerUserSessionIT.java
+++ b/server/sonar-webserver-auth/src/it/java/org/sonar/server/user/ServerUserSessionIT.java
@@ -397,7 +397,7 @@ public class ServerUserSessionIT {
@Test
public void hasComponentPermissionByDtoOrUuid_returns_true_for_anonymous_user_for_permissions_USER_and_CODEVIEWER_on_public_projects_with_global_permissions() {
ProjectData publicProject = db.components().insertPublicProject();
- db.users().insertProjectPermissionOnAnyone("p1", publicProject.getProjectDto());
+ db.users().insertEntityPermissionOnAnyone("p1", publicProject.getProjectDto());
ServerUserSession underTest = newAnonymousSession();
@@ -465,7 +465,7 @@ public class ServerUserSessionIT {
@Test
public void hasComponentPermissionByDtoOrUuid_returns_true_for_anonymous_user_for_inserted_permissions_on_group_AnyOne_on_public_projects() {
ProjectData publicProject = db.components().insertPublicProject();
- db.users().insertProjectPermissionOnAnyone("p1", publicProject.getProjectDto());
+ db.users().insertEntityPermissionOnAnyone("p1", publicProject.getProjectDto());
ServerUserSession underTest = newAnonymousSession();
@@ -537,7 +537,7 @@ public class ServerUserSessionIT {
@Test
public void hasComponentPermissionByDtoOrUuid_keeps_cache_of_permissions_of_anonymous_user() {
ProjectData publicProject = db.components().insertPublicProject();
- db.users().insertProjectPermissionOnAnyone(UserRole.ADMIN, publicProject.getProjectDto());
+ db.users().insertEntityPermissionOnAnyone(UserRole.ADMIN, publicProject.getProjectDto());
UserSession underTest = newAnonymousSession();
@@ -546,7 +546,7 @@ public class ServerUserSessionIT {
// change permissions without updating the cache
db.users().deleteProjectPermissionFromAnyone(publicProject.getProjectDto(), UserRole.ADMIN);
- db.users().insertProjectPermissionOnAnyone(UserRole.ISSUE_ADMIN, publicProject.getProjectDto());
+ db.users().insertEntityPermissionOnAnyone(UserRole.ISSUE_ADMIN, publicProject.getProjectDto());
assertThat(hasComponentPermissionByDtoOrUuid(underTest, UserRole.ADMIN, publicProject.getMainBranchComponent())).isTrue();
assertThat(hasComponentPermissionByDtoOrUuid(underTest, UserRole.ISSUE_ADMIN, publicProject.getMainBranchComponent())).isFalse();
}
@@ -572,7 +572,7 @@ public class ServerUserSessionIT {
public void keepAuthorizedComponents_filters_components_with_granted_permissions_for_anonymous() {
ProjectData publicProject = db.components().insertPublicProject();
ProjectData privateProject = db.components().insertPrivateProject();
- db.users().insertProjectPermissionOnAnyone(UserRole.ISSUE_ADMIN, publicProject.getProjectDto());
+ db.users().insertEntityPermissionOnAnyone(UserRole.ISSUE_ADMIN, publicProject.getProjectDto());
UserSession underTest = newAnonymousSession();