diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2020-10-12 17:00:17 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2020-10-16 20:07:40 +0000 |
commit | 276abb42335b4609f922bbf7c289cc26bb98f302 (patch) | |
tree | 50c28ecea569e70ef44a1453a8ed71183ad0cbf9 /server/sonar-webserver-core | |
parent | 073c87437febccfa5217eb42a86a31e646275b57 (diff) | |
download | sonarqube-276abb42335b4609f922bbf7c289cc26bb98f302.tar.gz sonarqube-276abb42335b4609f922bbf7c289cc26bb98f302.zip |
SONAR-13936 Remove use of organizations in Permissions WS and DB
* SONAR-13936 Remove organization parameters from permissions WS
* SONAR-13936 Remove organization_uuid column from user_roles table
* SONAR-13936 Fix developer ITs
* SONAR-13936 Remove organization_uuid column from group_roles table
* SONAR-13936 Remove organization_uuid column from permission_templates table
Diffstat (limited to 'server/sonar-webserver-core')
2 files changed, 2 insertions, 6 deletions
diff --git a/server/sonar-webserver-core/src/main/java/org/sonar/server/startup/RegisterPermissionTemplates.java b/server/sonar-webserver-core/src/main/java/org/sonar/server/startup/RegisterPermissionTemplates.java index a32c28e89e1..ce495844b16 100644 --- a/server/sonar-webserver-core/src/main/java/org/sonar/server/startup/RegisterPermissionTemplates.java +++ b/server/sonar-webserver-core/src/main/java/org/sonar/server/startup/RegisterPermissionTemplates.java @@ -79,7 +79,6 @@ public class RegisterPermissionTemplates implements Startable { } PermissionTemplateDto template = new PermissionTemplateDto() - .setOrganizationUuid(defaultOrganizationProvider.get().getUuid()) .setName("Default template") .setUuid(DEFAULT_TEMPLATE_UUID) .setDescription("This permission template will be used as default when no other permission configuration is available") diff --git a/server/sonar-webserver-core/src/test/java/org/sonar/server/startup/RegisterPermissionTemplatesTest.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/startup/RegisterPermissionTemplatesTest.java index 232a907ac32..1c9d0879c11 100644 --- a/server/sonar-webserver-core/src/test/java/org/sonar/server/startup/RegisterPermissionTemplatesTest.java +++ b/server/sonar-webserver-core/src/test/java/org/sonar/server/startup/RegisterPermissionTemplatesTest.java @@ -156,9 +156,7 @@ public class RegisterPermissionTemplatesTest { @Test public void do_not_create_default_template_if_already_exists_but_register_when_it_is_not() { - db.permissionTemplates().insertTemplate(newPermissionTemplateDto() - .setOrganizationUuid(db.getDefaultOrganization().getUuid()) - .setUuid(DEFAULT_TEMPLATE_UUID)); + db.permissionTemplates().insertTemplate(newPermissionTemplateDto().setUuid(DEFAULT_TEMPLATE_UUID)); underTest.start(); @@ -168,7 +166,6 @@ public class RegisterPermissionTemplatesTest { @Test public void do_not_fail_if_default_template_exists_and_is_registered() { PermissionTemplateDto projectTemplate = db.permissionTemplates().insertTemplate(newPermissionTemplateDto() - .setOrganizationUuid(db.getDefaultOrganization().getUuid()) .setUuid(DEFAULT_TEMPLATE_UUID)); db.organizations().setDefaultTemplates(projectTemplate, null, null); @@ -189,7 +186,7 @@ public class RegisterPermissionTemplatesTest { String expectedGroupName) { assertThat( groupPermissions.stream().anyMatch(gp -> gp.getPermission().equals(expectedPermission) && Objects.equals(gp.getGroupName(), expectedGroupName))) - .isTrue(); + .isTrue(); } private void verifyDefaultTemplates() { |