2011-08-07 23:20:57 +04:00
|
|
|
<?php
|
|
|
|
|
2012-05-03 14:23:29 +04:00
|
|
|
OCP\JSON::checkAppEnabled('files_sharing');
|
2012-05-05 22:56:52 +04:00
|
|
|
OCP\JSON::checkLoggedIn();
|
2012-07-07 18:03:21 +04:00
|
|
|
OCP\JSON::callCheck();
|
2011-08-07 23:20:57 +04:00
|
|
|
|
2012-05-05 22:56:52 +04:00
|
|
|
$source = '/'.OCP\USER::getUser().'/files'.$_POST['source'];
|
|
|
|
$uid_shared_with = $_POST['uid_shared_with'];
|
|
|
|
$permissions = $_POST['permissions'];
|
2011-08-07 23:20:57 +04:00
|
|
|
OC_Share::setPermissions($source, $uid_shared_with, $permissions);
|
|
|
|
|
2012-05-05 22:56:52 +04:00
|
|
|
OCP\JSON::success();
|