]> source.dussan.org Git - nextcloud-server.git/commitdiff
fixes misunderstanding of the error message 15576/head
authorArthur Schiwon <blizzz@arthur-schiwon.de>
Thu, 16 May 2019 12:17:41 +0000 (14:17 +0200)
committerBackportbot <backportbot-noreply@rullzer.com>
Thu, 16 May 2019 17:49:15 +0000 (17:49 +0000)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
apps/provisioning_api/lib/Controller/UsersController.php
apps/provisioning_api/tests/Controller/UsersControllerTest.php

index c8882f7b00854fae749e63f08d1f3db7f73c9e4d..30094470a7aa00afa05a948432014a649e62a5bd 100644 (file)
@@ -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);
                        }
                }
 
index 7b235a1d5abeea6c8e5d4bff3349c31124363387..7772000d51ce761993d1f26fa6daa71fa7e31830 100644 (file)
@@ -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();