diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-07-14 15:37:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-14 15:37:42 +0200 |
commit | 813b58ab947222f983fe25d56781f1f43c840538 (patch) | |
tree | c61f76b18f464a4cf337ef0f242aee1af3f8fbbb /apps/files_sharing | |
parent | dc07ab0d26aed35a67063d6afafe375133a10b23 (diff) | |
parent | 268e65730a5dfc9f20b24240d1aedf6180beb9bb (diff) | |
download | nextcloud-server-813b58ab947222f983fe25d56781f1f43c840538.tar.gz nextcloud-server-813b58ab947222f983fe25d56781f1f43c840538.zip |
Merge pull request #398 from nextcloud/issue-388-fix-hidden-file-list-master
Fix hidden file list master
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/lib/API/Share20OCS.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/files_sharing/lib/API/Share20OCS.php b/apps/files_sharing/lib/API/Share20OCS.php index 436b8d15ac8..9d7aeffcc1b 100644 --- a/apps/files_sharing/lib/API/Share20OCS.php +++ b/apps/files_sharing/lib/API/Share20OCS.php @@ -602,11 +602,12 @@ class Share20OCS { } if ($newPermissions !== null && - $newPermissions !== \OCP\Constants::PERMISSION_READ && - // legacy - $newPermissions !== (\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_CREATE | \OCP\Constants::PERMISSION_UPDATE) && - // correct - $newPermissions !== (\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_CREATE | \OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_DELETE) + !in_array($newPermissions, [ + \OCP\Constants::PERMISSION_READ, + \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_CREATE | \OCP\Constants::PERMISSION_UPDATE, // legacy + \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_CREATE | \OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_DELETE, // correct + \OCP\Constants::PERMISSION_CREATE, // hidden file list + ]) ) { $share->getNode()->unlock(ILockingProvider::LOCK_SHARED); return new \OC_OCS_Result(null, 400, $this->l->t('Can\'t change permissions for public share links')); |