From 092cf812c9efe0c908941553d3693b627c4fc56b Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Thu, 16 May 2019 14:17:41 +0200 Subject: [PATCH] fixes misunderstanding of the error message Signed-off-by: Arthur Schiwon --- apps/provisioning_api/lib/Controller/UsersController.php | 2 +- apps/provisioning_api/tests/Controller/UsersControllerTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index c7625a26f5..b993188c97 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -773,7 +773,7 @@ class UsersController extends AUserData { if (count($userSubAdminGroups) <= 1) { // Subadmin must not be able to remove a user from all their subadmin groups. - throw new OCSException('Cannot remove user from this group as this is the only remaining group you are a SubAdmin of', 105); + throw new OCSException('Not viable to remove user from the last group you are SubAdmin of', 105); } } diff --git a/apps/provisioning_api/tests/Controller/UsersControllerTest.php b/apps/provisioning_api/tests/Controller/UsersControllerTest.php index c6e0082c4b..7a7f014452 100644 --- a/apps/provisioning_api/tests/Controller/UsersControllerTest.php +++ b/apps/provisioning_api/tests/Controller/UsersControllerTest.php @@ -2516,7 +2516,7 @@ class UsersControllerTest extends TestCase { /** * @expectedException \OCP\AppFramework\OCS\OCSException * @expectedExceptionCode 105 - * @expectedExceptionMessage Cannot remove user from this group as this is the only remaining group you are a SubAdmin of + * @expectedExceptionMessage Not viable to remove user from the last group you are SubAdmin of */ public function testRemoveFromGroupAsSubAdminFromLastSubAdminGroup() { $loggedInUser = $this->getMockBuilder(IUser::class)->disableOriginalConstructor()->getMock();