diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2014-04-23 14:37:07 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2014-04-23 14:37:07 +0200 |
commit | 4696b06060b8dd43e1465d675aaa71b80afcc5f9 (patch) | |
tree | 2e475ee8fc743d609b94c6f8ab5b8c03377c46a7 | |
parent | 1041617a4e279e85b4e4aab11fbac8cde30336d2 (diff) | |
parent | d3a15b6b0765661ce865a71c37e45b2340bf0a95 (diff) | |
download | nextcloud-server-4696b06060b8dd43e1465d675aaa71b80afcc5f9.tar.gz nextcloud-server-4696b06060b8dd43e1465d675aaa71b80afcc5f9.zip |
Merge pull request #8261 from owncloud/stable6-backport-8182
Backport of #8182
-rw-r--r-- | apps/files_external/ajax/addMountPoint.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/files_external/ajax/addMountPoint.php b/apps/files_external/ajax/addMountPoint.php index 9100d47db3a..2423692be18 100644 --- a/apps/files_external/ajax/addMountPoint.php +++ b/apps/files_external/ajax/addMountPoint.php @@ -1,10 +1,15 @@ <?php OCP\JSON::checkAppEnabled('files_external'); +OCP\JSON::checkLoggedIn(); OCP\JSON::callCheck(); if ($_POST['isPersonal'] == 'true') { - OCP\JSON::checkLoggedIn(); + // Check whether the user has permissions to add personal storage backends + if(OCP\Config::getAppValue('files_external', 'allow_user_mounting', 'yes') !== 'yes') { + OCP\JSON::error(array('data' => array('message' => 'no permission'))); + return; + } $isPersonal = true; } else { OCP\JSON::checkAdminUser(); |