|
@@ 209-212 (lines=4) @@
|
| 206 |
|
} |
| 207 |
|
|
| 208 |
|
// Cannot share with yourself |
| 209 |
|
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER && |
| 210 |
|
$share->getSharedWith() === $share->getSharedBy()) { |
| 211 |
|
throw new \InvalidArgumentException('Can\'t share with yourself'); |
| 212 |
|
} |
| 213 |
|
|
| 214 |
|
// The path should be set |
| 215 |
|
if ($share->getNode() === null) { |
|
@@ 608-611 (lines=4) @@
|
| 605 |
|
} |
| 606 |
|
|
| 607 |
|
// Cannot share with the owner |
| 608 |
|
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER && |
| 609 |
|
$share->getSharedWith() === $share->getShareOwner()) { |
| 610 |
|
throw new \InvalidArgumentException('Can\'t share with the share owner'); |
| 611 |
|
} |
| 612 |
|
|
| 613 |
|
// Generate the target |
| 614 |
|
$target = $this->config->getSystemValue('share_folder', '/') .'/'. $share->getNode()->getName(); |
|
@@ 698-701 (lines=4) @@
|
| 695 |
|
} |
| 696 |
|
|
| 697 |
|
// Cannot share with the owner |
| 698 |
|
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER && |
| 699 |
|
$share->getSharedWith() === $share->getShareOwner()) { |
| 700 |
|
throw new \InvalidArgumentException('Can\'t share with the share owner'); |
| 701 |
|
} |
| 702 |
|
|
| 703 |
|
$this->generalCreateChecks($share); |
| 704 |
|
|