|
@@ 213-216 (lines=4) @@
|
| 210 |
|
} |
| 211 |
|
|
| 212 |
|
// Cannot share with yourself |
| 213 |
|
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER && |
| 214 |
|
$share->getSharedWith() === $share->getSharedBy()) { |
| 215 |
|
throw new \InvalidArgumentException('Can\'t share with yourself'); |
| 216 |
|
} |
| 217 |
|
|
| 218 |
|
// The path should be set |
| 219 |
|
if ($share->getNode() === null) { |
|
@@ 614-617 (lines=4) @@
|
| 611 |
|
} |
| 612 |
|
|
| 613 |
|
// Cannot share with the owner |
| 614 |
|
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER && |
| 615 |
|
$share->getSharedWith() === $share->getShareOwner()) { |
| 616 |
|
throw new \InvalidArgumentException('Can\'t share with the share owner'); |
| 617 |
|
} |
| 618 |
|
|
| 619 |
|
// Generate the target |
| 620 |
|
$target = $this->config->getSystemValue('share_folder', '/') .'/'. $share->getNode()->getName(); |
|
@@ 704-707 (lines=4) @@
|
| 701 |
|
} |
| 702 |
|
|
| 703 |
|
// Cannot share with the owner |
| 704 |
|
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER && |
| 705 |
|
$share->getSharedWith() === $share->getShareOwner()) { |
| 706 |
|
throw new \InvalidArgumentException('Can\'t share with the share owner'); |
| 707 |
|
} |
| 708 |
|
|
| 709 |
|
$this->generalCreateChecks($share); |
| 710 |
|
|