nextcloud/apps/files_external/ajax/addMountPoint.php

20 lines
501 B
PHP
Raw Normal View History

<?php
OCP\JSON::checkAppEnabled('files_external');
2012-07-07 18:12:21 +04:00
OCP\JSON::callCheck();
if ($_POST['isPersonal'] == 'true') {
OCP\JSON::checkLoggedIn();
$isPersonal = true;
} else {
OCP\JSON::checkAdminUser();
$isPersonal = false;
}
$status = OC_Mount_Config::addMountPoint($_POST['mountPoint'],
$_POST['class'],
$_POST['classOptions'],
$_POST['mountType'],
$_POST['applicable'],
$isPersonal);
OCP\JSON::success(array('data' => array('message' => $status)));