|
@@ 249-252 (lines=4) @@
|
| 246 |
|
} |
| 247 |
|
|
| 248 |
|
// Cannot share with yourself |
| 249 |
|
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER && |
| 250 |
|
$share->getSharedWith() === $share->getSharedBy()) { |
| 251 |
|
throw new \InvalidArgumentException('Can’t share with yourself'); |
| 252 |
|
} |
| 253 |
|
|
| 254 |
|
// The path should be set |
| 255 |
|
if ($share->getNode() === null) { |
|
@@ 646-649 (lines=4) @@
|
| 643 |
|
} |
| 644 |
|
|
| 645 |
|
// Cannot share with the owner |
| 646 |
|
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER && |
| 647 |
|
$share->getSharedWith() === $share->getShareOwner()) { |
| 648 |
|
throw new \InvalidArgumentException('Can’t share with the share owner'); |
| 649 |
|
} |
| 650 |
|
|
| 651 |
|
// Generate the target |
| 652 |
|
$target = $this->config->getSystemValue('share_folder', '/') .'/'. $share->getNode()->getName(); |
|
@@ 804-807 (lines=4) @@
|
| 801 |
|
} |
| 802 |
|
|
| 803 |
|
// Cannot share with the owner |
| 804 |
|
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER && |
| 805 |
|
$share->getSharedWith() === $share->getShareOwner()) { |
| 806 |
|
throw new \InvalidArgumentException('Can’t share with the share owner'); |
| 807 |
|
} |
| 808 |
|
|
| 809 |
|
$this->generalCreateChecks($share); |
| 810 |
|
|