removeMountPoint.php 511 B

123456789101112131415161718192021222324
  1. <?php
  2. OCP\JSON::checkAppEnabled('files_external');
  3. OCP\JSON::callCheck();
  4. if (!isset($_POST['isPersonal']))
  5. return;
  6. if (!isset($_POST['mountPoint']))
  7. return;
  8. if (!isset($_POST['mountType']))
  9. return;
  10. if (!isset($_POST['applicable']))
  11. return;
  12. if ($_POST['isPersonal'] == 'true') {
  13. OCP\JSON::checkLoggedIn();
  14. $isPersonal = true;
  15. } else {
  16. OCP\JSON::checkAdminUser();
  17. $isPersonal = false;
  18. }
  19. OC_Mount_Config::removeMountPoint($_POST['mountPoint'], $_POST['mountType'], $_POST['applicable'], $isPersonal);