Skip to content

Commit

Permalink
Merge pull request #15575 from nextcloud/backport/15564/stable16
Browse files Browse the repository at this point in the history
[stable16] User management/subadmin: rephrase ambiguous error message
  • Loading branch information
blizzz authored May 17, 2019
2 parents 223d32b + 092cf81 commit 747721b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/provisioning_api/lib/Controller/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ public function removeFromGroup(string $userId, string $groupid): DataResponse {

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);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2516,7 +2516,7 @@ public function testRemoveFromGroupAsSubAdminFromSubAdmin() {
/**
* @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();
Expand Down

0 comments on commit 747721b

Please sign in to comment.