diff options
author | Michael Gapczynski <GapczynskiM@gmail.com> | 2012-06-08 11:42:00 -0400 |
---|---|---|
committer | Michael Gapczynski <GapczynskiM@gmail.com> | 2012-06-08 11:42:29 -0400 |
commit | 4b3ae60558a5d9d18cdd7be0d844d577785f46fb (patch) | |
tree | 8e8c09853a29c1605a289710c12cefa45e92da65 /apps/files_external/ajax | |
parent | f70615106f3aca819a9e2356d8e6bbff18437188 (diff) | |
download | nextcloud-server-4b3ae60558a5d9d18cdd7be0d844d577785f46fb.tar.gz nextcloud-server-4b3ae60558a5d9d18cdd7be0d844d577785f46fb.zip |
Working UI for external storage mount configuration
Diffstat (limited to 'apps/files_external/ajax')
-rw-r--r-- | apps/files_external/ajax/addMountPoint.php | 13 | ||||
-rw-r--r-- | apps/files_external/ajax/removeMountPoint.php | 13 |
2 files changed, 26 insertions, 0 deletions
diff --git a/apps/files_external/ajax/addMountPoint.php b/apps/files_external/ajax/addMountPoint.php new file mode 100644 index 00000000000..549cb6a3427 --- /dev/null +++ b/apps/files_external/ajax/addMountPoint.php @@ -0,0 +1,13 @@ +<?php + +OCP\JSON::checkAppEnabled('files_external'); +if ($_POST['isPersonal'] == 'true') { + OCP\JSON::checkLoggedIn(); + $isPersonal = true; +} else { + OCP\JSON::checkAdminUser(); + $isPersonal = false; +} +OC_Mount_Config::addMountPoint($_POST['mountPoint'], $_POST['class'], $_POST['classOptions'], $_POST['mountType'], $_POST['applicable'], $isPersonal); + +?> diff --git a/apps/files_external/ajax/removeMountPoint.php b/apps/files_external/ajax/removeMountPoint.php new file mode 100644 index 00000000000..b77b306bcb5 --- /dev/null +++ b/apps/files_external/ajax/removeMountPoint.php @@ -0,0 +1,13 @@ +<?php + +OCP\JSON::checkAppEnabled('files_external'); +if ($_POST['isPersonal'] == 'true') { + OCP\JSON::checkLoggedIn(); + $isPersonal = true; +} else { + OCP\JSON::checkAdminUser(); + $isPersonal = false; +} +OC_Mount_Config::removeMountPoint($_POST['mountPoint'], $_POST['mountType'], $_POST['applicable'], $isPersonal); + +?> |