]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3392 Removed sonar-users groups from Users and Codeviewers permissions in the...
authorJean-Baptiste Vilain <jean-baptiste.vilain@sonarsource.com>
Tue, 23 Jul 2013 13:51:18 +0000 (15:51 +0200)
committerJean-Baptiste Vilain <jean-baptiste.vilain@sonarsource.com>
Tue, 23 Jul 2013 13:51:30 +0000 (15:51 +0200)
sonar-server/src/main/java/org/sonar/server/startup/RegisterPermissionTemplates.java
sonar-server/src/test/java/org/sonar/server/startup/RegisterPermissionTemplatesTest.java

index 5e85f988f0d74f2b8a308fe17cb9911fc79499ad..22d6d8b6fe4bd453637ad9daf27146f735d5b694 100644 (file)
@@ -81,9 +81,7 @@ public class RegisterPermissionTemplates {
     PermissionTemplateDto defaultPermissionTemplate = permissionDao
       .createPermissionTemplate(templateName, PermissionTemplateDto.DEFAULT.getDescription());
     addGroupPermission(defaultPermissionTemplate, UserRole.ADMIN, DefaultGroups.ADMINISTRATORS);
-    addGroupPermission(defaultPermissionTemplate, UserRole.USER, DefaultGroups.USERS);
     addGroupPermission(defaultPermissionTemplate, UserRole.USER, DefaultGroups.ANYONE);
-    addGroupPermission(defaultPermissionTemplate, UserRole.CODEVIEWER, DefaultGroups.USERS);
     addGroupPermission(defaultPermissionTemplate, UserRole.CODEVIEWER, DefaultGroups.ANYONE);
   }
 
index f8c147b1544c402e4ef40703ab95fae00ae077dd..3e23d2731aefcaa02957266585557def95c10c72 100644 (file)
@@ -71,10 +71,9 @@ public class RegisterPermissionTemplatesTest {
     verify(loadedTemplateDao).insert(argThat(Matches.template(expectedTemplate)));
     verify(permissionDao).createPermissionTemplate(PermissionTemplateDto.DEFAULT.getName(), PermissionTemplateDto.DEFAULT.getDescription());
     verify(permissionDao).addGroupPermission(1L, 1L, UserRole.ADMIN);
-    verify(permissionDao).addGroupPermission(1L, 2L, UserRole.USER);
     verify(permissionDao).addGroupPermission(1L, null, UserRole.USER);
-    verify(permissionDao).addGroupPermission(1L, 2L, UserRole.CODEVIEWER);
     verify(permissionDao).addGroupPermission(1L, null, UserRole.CODEVIEWER);
+    verifyNoMoreInteractions(permissionDao);
     verify(settings).saveProperty(RegisterPermissionTemplates.DEFAULT_TEMPLATE_PROPERTY, PermissionTemplateDto.DEFAULT.getKee());
   }