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

index c7625a26f5973ead458bb2de529a86852a581f06..b993188c97e1ae5d0a237338b6fd173baf09d8da 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 c6e0082c4b004408ffaba692ed6013e41f9d495a..7a7f01445244a052b889c99b86d7e0e49eeed4f4 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();