|
@@ 241-244 (lines=4) @@
|
| 238 |
|
} |
| 239 |
|
|
| 240 |
|
// Cannot share with yourself |
| 241 |
|
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER && |
| 242 |
|
$share->getSharedWith() === $share->getSharedBy()) { |
| 243 |
|
throw new \InvalidArgumentException('Can\'t share with yourself'); |
| 244 |
|
} |
| 245 |
|
|
| 246 |
|
// The path should be set |
| 247 |
|
if ($share->getNode() === null) { |
|
@@ 625-628 (lines=4) @@
|
| 622 |
|
} |
| 623 |
|
|
| 624 |
|
// Cannot share with the owner |
| 625 |
|
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER && |
| 626 |
|
$share->getSharedWith() === $share->getShareOwner()) { |
| 627 |
|
throw new \InvalidArgumentException('Can\'t share with the share owner'); |
| 628 |
|
} |
| 629 |
|
|
| 630 |
|
// Generate the target |
| 631 |
|
$target = $this->config->getSystemValue('share_folder', '/') .'/'. $share->getNode()->getName(); |
|
@@ 821-824 (lines=4) @@
|
| 818 |
|
} |
| 819 |
|
|
| 820 |
|
// Cannot share with the owner |
| 821 |
|
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER && |
| 822 |
|
$share->getSharedWith() === $share->getShareOwner()) { |
| 823 |
|
throw new \InvalidArgumentException('Can\'t share with the share owner'); |
| 824 |
|
} |
| 825 |
|
|
| 826 |
|
$this->generalCreateChecks($share); |
| 827 |
|
|