initial commit, start implementing the ocs share api

This commit is contained in:
Bjoern Schiessle 2013-09-04 14:32:05 +02:00
parent 85758f3d7d
commit 985758305f
2 changed files with 53 additions and 1 deletions

View file

@ -7,6 +7,7 @@ OC::$CLASSPATH['OC\Files\Cache\Shared_Cache'] = 'files_sharing/lib/cache.php';
OC::$CLASSPATH['OC\Files\Cache\Shared_Permissions'] = 'files_sharing/lib/permissions.php';
OC::$CLASSPATH['OC\Files\Cache\Shared_Updater'] = 'files_sharing/lib/updater.php';
OC::$CLASSPATH['OC\Files\Cache\Shared_Watcher'] = 'files_sharing/lib/watcher.php';
OC::$CLASSPATH['OCA\Files\Share\Api'] = 'files_sharing/lib/api.php';
OCP\Util::connectHook('OC_Filesystem', 'setup', '\OC\Files\Storage\Shared', 'setup');
OCP\Share::registerBackend('file', 'OC_Share_Backend_File');
OCP\Share::registerBackend('folder', 'OC_Share_Backend_Folder', 'file');

View file

@ -2,4 +2,55 @@
$this->create('core_ajax_public_preview', '/publicpreview.png')->action(
function() {
require_once __DIR__ . '/../ajax/publicpreview.php';
});
});
//TODO: GET: share status of a given file/folder
//TODO: GET: share status of all files in a given folder?
//TODO: SET: share (unshare)
//TODO: SET: permissions
//TODO: SET: expire date
//TODO: SET: mail notification
OC_API::register('get',
'/apps/files_sharing/api/share/{path}',
array('\OCA\Files\Share\Api', 'getShare'),
'files_sharing',
OC_API::USER_AUTH,
array('path' => ''),
array('path' => '.+')); //allow slashes in parameter path
/*
OC_API::register('get',
'/apps/files_sharing/api/share/group/{path}',
array('\OCA\Files\Share\Api', 'getShare'),
'files_sharing',
OC_API::USER_AUTH,
array('path' => ''));
OC_API::register('get',
'/apps/files_sharing/api/share/user/{path}',
array('\OCA\Files\Share\Api', 'getShare'),
'files_sharing',
OC_API::USER_AUTH,
array('path' => ''));
OC_API::register('get',
'/apps/files_sharing/api/permission/{path}',
array('\OCA\Files\Share\Api', 'getShare'),
'files_sharing',
OC_API::USER_AUTH,
array('path' => ''));
OC_API::register('get',
'/apps/files_sharing/api/expire/{path}',
array('\OCA\Files\Share\Api', 'getShare'),
'files_sharing',
OC_API::USER_AUTH,
array('path' => ''));
OC_API::register('get',
'/apps/files_sharing/api/notify/{path}',
array('\OCA\Files\Share\Api', 'getShare'),
'files_sharing',
OC_API::USER_AUTH,
array('path' => ''));
*/