|
@@ 185-195 (lines=11) @@
|
| 182 |
|
//return new \OC_OCS_Result(null, 404, 'wrong share ID, share doesn\'t exist.'); |
| 183 |
|
} |
| 184 |
|
|
| 185 |
|
if ($share === null) { |
| 186 |
|
if (!$this->shareManager->outgoingServer2ServerSharesAllowed()) { |
| 187 |
|
return new \OC_OCS_Result(null, 404, 'wrong share ID, share doesn\'t exist.'); |
| 188 |
|
} |
| 189 |
|
|
| 190 |
|
try { |
| 191 |
|
$share = $this->shareManager->getShareById('ocFederatedSharing:' . $id); |
| 192 |
|
} catch (ShareNotFound $e) { |
| 193 |
|
return new \OC_OCS_Result(null, 404, 'wrong share ID, share doesn\'t exist.'); |
| 194 |
|
} |
| 195 |
|
} |
| 196 |
|
|
| 197 |
|
if ($this->canAccessShare($share)) { |
| 198 |
|
try { |
|
@@ 231-241 (lines=11) @@
|
| 228 |
|
} |
| 229 |
|
|
| 230 |
|
// Could not find the share as internal share... maybe it is a federated share |
| 231 |
|
if ($share === null) { |
| 232 |
|
if (!$this->shareManager->outgoingServer2ServerSharesAllowed()) { |
| 233 |
|
return new \OC_OCS_Result(null, 404, 'wrong share ID, share doesn\'t exist.'); |
| 234 |
|
} |
| 235 |
|
|
| 236 |
|
try { |
| 237 |
|
$share = $this->shareManager->getShareById('ocFederatedSharing:' . $id); |
| 238 |
|
} catch (ShareNotFound $e) { |
| 239 |
|
return new \OC_OCS_Result(null, 404, 'wrong share ID, share doesn\'t exist.'); |
| 240 |
|
} |
| 241 |
|
} |
| 242 |
|
|
| 243 |
|
if (!$this->canAccessShare($share, false)) { |
| 244 |
|
return new \OC_OCS_Result(null, 404, 'could not delete share'); |
|
@@ 555-565 (lines=11) @@
|
| 552 |
|
} |
| 553 |
|
|
| 554 |
|
// Could not find the share as internal share... maybe it is a federated share |
| 555 |
|
if ($share === null) { |
| 556 |
|
if (!$this->shareManager->outgoingServer2ServerSharesAllowed()) { |
| 557 |
|
return new \OC_OCS_Result(null, 404, 'wrong share ID, share doesn\'t exist.'); |
| 558 |
|
} |
| 559 |
|
|
| 560 |
|
try { |
| 561 |
|
$share = $this->shareManager->getShareById('ocFederatedSharing:' . $id); |
| 562 |
|
} catch (ShareNotFound $e) { |
| 563 |
|
return new \OC_OCS_Result(null, 404, 'wrong share ID, share doesn\'t exist.'); |
| 564 |
|
} |
| 565 |
|
} |
| 566 |
|
|
| 567 |
|
if (!$this->canAccessShare($share, false)) { |
| 568 |
|
return new \OC_OCS_Result(null, 404, 'wrong share Id, share doesn\'t exist.'); |