Merge pull request #15575 from nextcloud/backport/15564/stable16

[stable16] User management/subadmin: rephrase ambiguous error message
This commit is contained in:
blizzz 2019-05-17 10:49:45 +02:00 committed by GitHub
commit 747721bb78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

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

View 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();