Skip to content

Commit 1e833c7

Browse files
committed
fixes misunderstanding of the error message
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
1 parent 856a33e commit 1e833c7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

apps/provisioning_api/lib/Controller/UsersController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ public function removeFromGroup(string $userId, string $groupid): DataResponse {
773773

774774
if (count($userSubAdminGroups) <= 1) {
775775
// Subadmin must not be able to remove a user from all their subadmin groups.
776-
throw new OCSException('Cannot remove user from this group as this is the only remaining group you are a SubAdmin of', 105);
776+
throw new OCSException('Not viable to remove user from the last group you are SubAdmin of', 105);
777777
}
778778
}
779779

apps/provisioning_api/tests/Controller/UsersControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2516,7 +2516,7 @@ public function testRemoveFromGroupAsSubAdminFromSubAdmin() {
25162516
/**
25172517
* @expectedException \OCP\AppFramework\OCS\OCSException
25182518
* @expectedExceptionCode 105
2519-
* @expectedExceptionMessage Cannot remove user from this group as this is the only remaining group you are a SubAdmin of
2519+
* @expectedExceptionMessage Not viable to remove user from the last group you are SubAdmin o
25202520
*/
25212521
public function testRemoveFromGroupAsSubAdminFromLastSubAdminGroup() {
25222522
$loggedInUser = $this->getMockBuilder(IUser::class)->disableOriginalConstructor()->getMock();

0 commit comments

Comments
 (0)