diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-07 17:22:21 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-05-02 09:31:22 +0200 |
commit | 8486926a147ad767d2ac8957512142f8a4873fa7 (patch) | |
tree | b05e4e103b445babbeba6beeac1916f2f7191e8d /apps/provisioning_api/appinfo | |
parent | 9c9fec36dd469494738b57c691338cbe71926c10 (diff) | |
download | nextcloud-server-8486926a147ad767d2ac8957512142f8a4873fa7.tar.gz nextcloud-server-8486926a147ad767d2ac8957512142f8a4873fa7.zip |
Add provisioning api to enable and disable users
Diffstat (limited to 'apps/provisioning_api/appinfo')
-rw-r--r-- | apps/provisioning_api/appinfo/routes.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/provisioning_api/appinfo/routes.php b/apps/provisioning_api/appinfo/routes.php index 08411856e7e..00a362864e5 100644 --- a/apps/provisioning_api/appinfo/routes.php +++ b/apps/provisioning_api/appinfo/routes.php @@ -26,10 +26,13 @@ namespace OCA\Provisioning_API\AppInfo; +use OCA\Provisioning_API\Apps; +use OCA\Provisioning_API\Groups; +use OCA\Provisioning_API\Users; use OCP\API; // Users -$users = new \OCA\Provisioning_API\Users( +$users = new Users( \OC::$server->getUserManager(), \OC::$server->getConfig(), \OC::$server->getGroupManager(), @@ -41,6 +44,8 @@ API::register('post', '/cloud/users', [$users, 'addUser'], 'provisioning_api', A API::register('get', '/cloud/users/{userid}', [$users, 'getUser'], 'provisioning_api', API::USER_AUTH); API::register('put', '/cloud/users/{userid}', [$users, 'editUser'], 'provisioning_api', API::USER_AUTH); API::register('delete', '/cloud/users/{userid}', [$users, 'deleteUser'], 'provisioning_api', API::SUBADMIN_AUTH); +API::register('put', '/cloud/users/{userid}/enable', [$users, 'enableUser'], 'provisioning_api', API::SUBADMIN_AUTH); +API::register('put', '/cloud/users/{userid}/disable', [$users, 'disableUser'], 'provisioning_api', API::SUBADMIN_AUTH); API::register('get', '/cloud/users/{userid}/groups', [$users, 'getUsersGroups'], 'provisioning_api', API::USER_AUTH); API::register('post', '/cloud/users/{userid}/groups', [$users, 'addToGroup'], 'provisioning_api', API::SUBADMIN_AUTH); API::register('delete', '/cloud/users/{userid}/groups', [$users, 'removeFromGroup'], 'provisioning_api', API::SUBADMIN_AUTH); @@ -49,7 +54,7 @@ API::register('delete', '/cloud/users/{userid}/subadmins', [$users, 'removeSubAd API::register('get', '/cloud/users/{userid}/subadmins', [$users, 'getUserSubAdminGroups'], 'provisioning_api', API::ADMIN_AUTH); // Groups -$groups = new \OCA\Provisioning_API\Groups( +$groups = new Groups( \OC::$server->getGroupManager(), \OC::$server->getUserSession(), \OC::$server->getRequest() @@ -61,7 +66,7 @@ API::register('delete', '/cloud/groups/{groupid}', [$groups, 'deleteGroup'], 'pr API::register('get', '/cloud/groups/{groupid}/subadmins', [$groups, 'getSubAdminsOfGroup'], 'provisioning_api', API::ADMIN_AUTH); // Apps -$apps = new \OCA\Provisioning_API\Apps( +$apps = new Apps( \OC::$server->getAppManager(), \OC::$server->getOcsClient() ); |