Merge pull request #18931 from owncloud/fix-files_sharing-breakage
Check if files_sharing is actually enabled before using it
This commit is contained in:
commit
6b22006f52
|
@ -104,31 +104,33 @@ API::register(
|
|||
);
|
||||
|
||||
// Server-to-Server Sharing
|
||||
$s2s = new \OCA\Files_Sharing\API\Server2Server();
|
||||
API::register('post',
|
||||
if (\OC::$server->getAppManager()->isEnabledForUser('files_sharing')) {
|
||||
$s2s = new \OCA\Files_Sharing\API\Server2Server();
|
||||
API::register('post',
|
||||
'/cloud/shares',
|
||||
array($s2s, 'createShare'),
|
||||
'files_sharing',
|
||||
API::GUEST_AUTH
|
||||
);
|
||||
);
|
||||
|
||||
API::register('post',
|
||||
API::register('post',
|
||||
'/cloud/shares/{id}/accept',
|
||||
array($s2s, 'acceptShare'),
|
||||
'files_sharing',
|
||||
API::GUEST_AUTH
|
||||
);
|
||||
);
|
||||
|
||||
API::register('post',
|
||||
API::register('post',
|
||||
'/cloud/shares/{id}/decline',
|
||||
array($s2s, 'declineShare'),
|
||||
'files_sharing',
|
||||
API::GUEST_AUTH
|
||||
);
|
||||
);
|
||||
|
||||
API::register('post',
|
||||
API::register('post',
|
||||
'/cloud/shares/{id}/unshare',
|
||||
array($s2s, 'unshare'),
|
||||
'files_sharing',
|
||||
API::GUEST_AUTH
|
||||
);
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue