summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/Controller
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2017-03-30 17:03:04 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2017-04-07 15:43:59 +0200
commit3323d01db1eda016f6e4665ae094c85903a83856 (patch)
tree8845984a62b5bd0d7b27bdbcdc7325c9dc3ee6de /apps/files_sharing/lib/Controller
parent676a4c781a5ff16ea34259c2958521596efc89b1 (diff)
downloadnextcloud-server-3323d01db1eda016f6e4665ae094c85903a83856.tar.gz
nextcloud-server-3323d01db1eda016f6e4665ae094c85903a83856.zip
update unit tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps/files_sharing/lib/Controller')
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php
index b810a515082..bc525b6ef82 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -669,13 +669,14 @@ class ShareAPIController extends OCSController {
throw new OCSNotFoundException($this->l->t('Wrong share ID, share doesn\'t exist'));
}
+ if ($permissions === null && $password === null && $publicUpload === null && $expireDate === null) {
+ throw new OCSBadRequestException($this->l->t('Wrong or no update parameter given'));
+ }
+
/*
* expirationdate, password and publicUpload only make sense for link shares
*/
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_LINK) {
- if ($permissions === null && $password === null && $publicUpload === null && $expireDate === null) {
- throw new OCSBadRequestException($this->l->t('Wrong or no update parameter given'));
- }
$newPermissions = null;
if ($publicUpload === 'true') {