let the actual federated share provider check if incoming/outgoing shares are enabled for the specific resource type

Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
This commit is contained in:
Bjoern Schiessle 2018-06-13 14:33:11 +02:00
parent 22d9246134
commit 5c8b26248b
No known key found for this signature in database
GPG key ID: 2378A753E2BF04F6

View file

@ -117,13 +117,6 @@ class RequestHandlerController extends Controller {
*/
public function addShare($shareWith, $name, $description, $providerId, $owner, $ownerDisplayName, $sharedBy, $sharedByDisplayName, $protocol, $shareType, $resourceType) {
if (!$this->config->incomingRequestsEnabled()) {
return new JSONResponse(
['message' => 'This server doesn\'t support outgoing federated shares'],
Http::STATUS_NOT_IMPLEMENTED
);
}
// check if all required parameters are set
if ($shareWith === null ||
$name === null ||
@ -212,12 +205,6 @@ class RequestHandlerController extends Controller {
* @return JSONResponse
*/
public function receiveNotification($notificationType, $resourceType, $providerId, array $notification) {
if (!$this->config->incomingRequestsEnabled()) {
return new JSONResponse(
['message' => 'This server doesn\'t support outgoing federated shares'],
Http::STATUS_NOT_IMPLEMENTED
);
}
// check if all required parameters are set
if ($notificationType === null ||