From b1984e97578c194302e40377e0b67b82df85c513 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Wed, 14 Jun 2017 12:20:03 +0200 Subject: [PATCH] Replace 'AnyOne' by 'Anyone' in error message --- .../org/sonar/server/permission/GroupPermissionChanger.java | 2 +- .../org/sonar/server/permission/GroupPermissionChangerTest.java | 2 +- .../java/org/sonar/server/permission/ws/AddGroupActionTest.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/sonar-server/src/main/java/org/sonar/server/permission/GroupPermissionChanger.java b/server/sonar-server/src/main/java/org/sonar/server/permission/GroupPermissionChanger.java index f5f82b5af0b..0ed7b360446 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/permission/GroupPermissionChanger.java +++ b/server/sonar-server/src/main/java/org/sonar/server/permission/GroupPermissionChanger.java @@ -83,7 +83,7 @@ public class GroupPermissionChanger { .ifPresent(projectId -> { checkRequest( !isAttemptToAddPermissionToAnyoneOnPrivateComponent(change, projectId), - "No permission can be granted to AnyOne on a private component"); + "No permission can be granted to Anyone on a private component"); checkRequest( !isAttemptToRemovePublicPermissionFromPublicComponent(change, projectId), "Permission %s can't be removed from a public component", change.getPermission()); diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/GroupPermissionChangerTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/GroupPermissionChangerTest.java index 4850eae1483..a5f534aec91 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/GroupPermissionChangerTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/GroupPermissionChangerTest.java @@ -91,7 +91,7 @@ public class GroupPermissionChangerTest { apply(new GroupPermissionChange(PermissionChange.Operation.ADD, perm, new ProjectId(privateProject), anyOneGroupId)); fail("a BadRequestException should have been thrown"); } catch (BadRequestException e) { - assertThat(e).hasMessage("No permission can be granted to AnyOne on a private component"); + assertThat(e).hasMessage("No permission can be granted to Anyone on a private component"); } }); } diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/AddGroupActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/AddGroupActionTest.java index e37c323a350..d99a6d98482 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/AddGroupActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/AddGroupActionTest.java @@ -377,7 +377,7 @@ public class AddGroupActionTest extends BasePermissionWsTest { .execute(); fail("a BadRequestException should have been raised for " + permission); } catch (BadRequestException e) { - assertThat(e).hasMessage("No permission can be granted to AnyOne on a private component"); + assertThat(e).hasMessage("No permission can be granted to Anyone on a private component"); } }); } -- 2.39.5