diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-12-08 15:32:59 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-12-08 15:32:59 +0100 |
commit | 8b3e3890628fa00d50c94af1131cbe3cd63e4a12 (patch) | |
tree | a07a6c8ae9353aa5dcc37e0510ecf5004b0cb42f /settings/controller/groupscontroller.php | |
parent | 3a49411051b3ad194b7296658c9177cbee82a74d (diff) | |
download | nextcloud-server-8b3e3890628fa00d50c94af1131cbe3cd63e4a12.tar.gz nextcloud-server-8b3e3890628fa00d50c94af1131cbe3cd63e4a12.zip |
Add statuscodes
Diffstat (limited to 'settings/controller/groupscontroller.php')
-rw-r--r-- | settings/controller/groupscontroller.php | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/settings/controller/groupscontroller.php b/settings/controller/groupscontroller.php index 6e6ab894605..8236d5507f4 100644 --- a/settings/controller/groupscontroller.php +++ b/settings/controller/groupscontroller.php @@ -10,6 +10,7 @@ namespace OC\Settings\Controller; +use OC\AppFramework\Http; use \OCP\AppFramework\Controller; use OCP\AppFramework\Http\DataResponse; use OCP\IGroupManager; @@ -85,7 +86,8 @@ class GroupsController extends Controller { 'data' => array( 'message' => (string)$this->l10n->t('Group already exists.') ) - ) + ), + Http::STATUS_CONFLICT ); } if($this->groupManager->createGroup($id)) { @@ -95,7 +97,8 @@ class GroupsController extends Controller { 'data' => array( 'groupname' => $id ) - ) + ), + Http::STATUS_CREATED ); } @@ -105,7 +108,8 @@ class GroupsController extends Controller { 'data' => array( 'message' => (string)$this->l10n->t('Unable to add group.') ) - ) + ), + Http::STATUS_FORBIDDEN ); } @@ -123,7 +127,8 @@ class GroupsController extends Controller { 'data' => array( 'groupname' => $id ) - ) + ), + Http::STATUS_NO_CONTENT ); } } @@ -132,8 +137,9 @@ class GroupsController extends Controller { 'status' => 'error', 'data' => array( 'message' => (string)$this->l10n->t('Unable to delete group.') - ) - ) + ), + ), + Http::STATUS_FORBIDDEN ); } |