|
@@ 215-223 (lines=9) @@
|
| 212 |
|
* @param string $itemType |
| 213 |
|
* @return bool |
| 214 |
|
*/ |
| 215 |
|
protected function isRemoteSharingAllowed(string $itemType): bool { |
| 216 |
|
try { |
| 217 |
|
// FIXME: static foo makes unit testing unnecessarily difficult |
| 218 |
|
$backend = \OC\Share\Share::getBackend($itemType); |
| 219 |
|
return $backend->isShareTypeAllowed(Share::SHARE_TYPE_REMOTE); |
| 220 |
|
} catch (\Exception $e) { |
| 221 |
|
return false; |
| 222 |
|
} |
| 223 |
|
} |
| 224 |
|
|
| 225 |
|
protected function isRemoteGroupSharingAllowed(string $itemType): bool { |
| 226 |
|
try { |
|
@@ 225-233 (lines=9) @@
|
| 222 |
|
} |
| 223 |
|
} |
| 224 |
|
|
| 225 |
|
protected function isRemoteGroupSharingAllowed(string $itemType): bool { |
| 226 |
|
try { |
| 227 |
|
// FIXME: static foo makes unit testing unnecessarily difficult |
| 228 |
|
$backend = \OC\Share\Share::getBackend($itemType); |
| 229 |
|
return $backend->isShareTypeAllowed(Share::SHARE_TYPE_REMOTE_GROUP); |
| 230 |
|
} catch (\Exception $e) { |
| 231 |
|
return false; |
| 232 |
|
} |
| 233 |
|
} |
| 234 |
|
|
| 235 |
|
|
| 236 |
|
/** |