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/userscontroller.php | |
parent | 3a49411051b3ad194b7296658c9177cbee82a74d (diff) | |
download | nextcloud-server-8b3e3890628fa00d50c94af1131cbe3cd63e4a12.tar.gz nextcloud-server-8b3e3890628fa00d50c94af1131cbe3cd63e4a12.zip |
Add statuscodes
Diffstat (limited to 'settings/controller/userscontroller.php')
-rw-r--r-- | settings/controller/userscontroller.php | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/settings/controller/userscontroller.php b/settings/controller/userscontroller.php index d61d19f8cb4..aa16574221e 100644 --- a/settings/controller/userscontroller.php +++ b/settings/controller/userscontroller.php @@ -10,6 +10,7 @@ namespace OC\Settings\Controller; +use OC\AppFramework\Http; use OC\User\User; use \OCP\AppFramework\Controller; use OCP\AppFramework\Http\DataResponse; @@ -164,7 +165,8 @@ class UsersController extends Controller { 'data' => array( 'message' => (string)$this->l10n->t('Unable to create user.') ) - ) + ), + Http::STATUS_FORBIDDEN ); } @@ -187,7 +189,8 @@ class UsersController extends Controller { 'groups' => $this->groupManager->getUserGroupIds($user), 'storageLocation' => $user->getHome() ) - ) + ), + Http::STATUS_CREATED ); } @@ -208,7 +211,8 @@ class UsersController extends Controller { 'data' => array( 'message' => (string)$this->l10n->t('Unable to delete user.') ) - ) + ), + Http::STATUS_FORBIDDEN ); } @@ -218,8 +222,10 @@ class UsersController extends Controller { array( 'status' => 'error', 'data' => array( - 'message' => (string)$this->l10n->t('Authentication error')) - ) + 'message' => (string)$this->l10n->t('Authentication error') + ) + ), + Http::STATUS_FORBIDDEN ); } @@ -232,7 +238,8 @@ class UsersController extends Controller { 'data' => array( 'username' => $id ) - ) + ), + Http::STATUS_NO_CONTENT ); } } @@ -243,7 +250,8 @@ class UsersController extends Controller { 'data' => array( 'message' => (string)$this->l10n->t('Unable to delete user.') ) - ) + ), + Http::STATUS_FORBIDDEN ); } |