diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-06-19 21:51:59 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-06-19 23:20:33 +0200 |
commit | a53dbb8c0b6c044b17604dfdd86b9ad951381c66 (patch) | |
tree | ef2e23bf0203ab737e11fb8315981605c6cbc31b /apps/provisioning_api | |
parent | 8a1cbbd90e73b44f1884b4a65fe4c55d40d377e9 (diff) | |
download | nextcloud-server-a53dbb8c0b6c044b17604dfdd86b9ad951381c66.tar.gz nextcloud-server-a53dbb8c0b6c044b17604dfdd86b9ad951381c66.zip |
New user support, provisionning api and design fixes
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/provisioning_api')
-rw-r--r-- | apps/provisioning_api/lib/Controller/GroupsController.php | 4 | ||||
-rw-r--r-- | apps/provisioning_api/tests/Controller/GroupsControllerTest.php | 15 |
2 files changed, 16 insertions, 3 deletions
diff --git a/apps/provisioning_api/lib/Controller/GroupsController.php b/apps/provisioning_api/lib/Controller/GroupsController.php index 765a7ea48e8..d30d0077cdc 100644 --- a/apps/provisioning_api/lib/Controller/GroupsController.php +++ b/apps/provisioning_api/lib/Controller/GroupsController.php @@ -115,7 +115,9 @@ class GroupsController extends AUserData { 'id' => $group->getGID(), 'displayname' => $group->getDisplayName(), 'usercount' => $group->count(), - 'disabled' => $group->countDisabled() + 'disabled' => $group->countDisabled(), + 'canAdd' => $group->canAddUser(), + 'canRemove' => $group->canRemoveUser(), ]; }, $groups); diff --git a/apps/provisioning_api/tests/Controller/GroupsControllerTest.php b/apps/provisioning_api/tests/Controller/GroupsControllerTest.php index 115c9c7ba46..2ed62a67841 100644 --- a/apps/provisioning_api/tests/Controller/GroupsControllerTest.php +++ b/apps/provisioning_api/tests/Controller/GroupsControllerTest.php @@ -107,6 +107,12 @@ class GroupsControllerTest extends \Test\TestCase { $group ->method('countDisabled') ->willReturn(11); + $group + ->method('canAddUser') + ->willReturn(true); + $group + ->method('canRemoveUser') + ->willReturn(true); return $group; } @@ -215,13 +221,18 @@ class GroupsControllerTest extends \Test\TestCase { 'id' => 'group1', 'displayname' => 'group1-name', 'usercount' => 123, - 'disabled' => 11 + 'disabled' => 11, + 'canAdd' => true, + 'canRemove' => true ), Array( 'id' => 'group2', 'displayname' => 'group2-name', 'usercount' => 123, - 'disabled' => 11 + 'disabled' => 11, + 'canAdd' => true, + 'canRemove' => true + ) ]], $result->getData()); |