diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-12-04 14:15:55 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-12-08 12:11:01 +0100 |
commit | fe7d9a7ca07bb21905c6483dee49bf37dd131674 (patch) | |
tree | f37a25e518c0ce38530a452d63386a525f5121f3 /settings/ajax/creategroup.php | |
parent | e6908f8b890414451dfc32af4d76562016d75d0f (diff) | |
download | nextcloud-server-fe7d9a7ca07bb21905c6483dee49bf37dd131674.tar.gz nextcloud-server-fe7d9a7ca07bb21905c6483dee49bf37dd131674.zip |
Add REST route for user & group management
First step of a somewhat testable user management. - I know, the JSON returns are in an ugly format but the JS expects it that way. So let's keep it that way until we have time to fix the JS in the future.
Diffstat (limited to 'settings/ajax/creategroup.php')
-rw-r--r-- | settings/ajax/creategroup.php | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/settings/ajax/creategroup.php b/settings/ajax/creategroup.php deleted file mode 100644 index be376bea9dc..00000000000 --- a/settings/ajax/creategroup.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -OCP\JSON::callCheck(); -OC_JSON::checkAdminUser(); - -$groupname = $_POST["groupname"]; -$l = \OC::$server->getL10N('settings'); - -// Does the group exist? -if( in_array( $groupname, OC_Group::getGroups())) { - OC_JSON::error(array("data" => array( "message" => $l->t("Group already exists") ))); - exit(); -} - -// Return Success story -if( OC_Group::createGroup( $groupname )) { - OC_JSON::success(array("data" => array( "groupname" => $groupname ))); -} -else{ - OC_JSON::error(array("data" => array( "message" => $l->t("Unable to add group") ))); -} |