Skip to content

Commit

Permalink
Merge pull request #15564 from nextcloud/fix/noid/rephrase-unclear-er…
Browse files Browse the repository at this point in the history
…ror-msg

User management/subadmin: rephrase ambiguous error message
  • Loading branch information
rullzer committed May 16, 2019
2 parents 633a198 + 45110f4 commit 58658f1
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
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
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 58658f1

Please sign in to comment.