|
@@ 580-583 (lines=4) @@
|
| 577 |
|
} |
| 578 |
|
|
| 579 |
|
// Cannot share with the owner |
| 580 |
|
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER && |
| 581 |
|
$share->getSharedWith() === $share->getShareOwner()) { |
| 582 |
|
throw new \InvalidArgumentException('Can\'t share with the share owner'); |
| 583 |
|
} |
| 584 |
|
|
| 585 |
|
// Generate the target |
| 586 |
|
$target = $this->config->getSystemValue('share_folder', '/') .'/'. $share->getNode()->getName(); |
|
@@ 667-670 (lines=4) @@
|
| 664 |
|
} |
| 665 |
|
|
| 666 |
|
// Cannot share with the owner |
| 667 |
|
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER && |
| 668 |
|
$share->getSharedWith() === $share->getShareOwner()) { |
| 669 |
|
throw new \InvalidArgumentException('Can\'t share with the share owner'); |
| 670 |
|
} |
| 671 |
|
|
| 672 |
|
$this->generalCreateChecks($share); |
| 673 |
|
|
|
@@ 199-202 (lines=4) @@
|
| 196 |
|
} |
| 197 |
|
|
| 198 |
|
// Cannot share with yourself |
| 199 |
|
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER && |
| 200 |
|
$share->getSharedWith() === $share->getSharedBy()) { |
| 201 |
|
throw new \InvalidArgumentException('Can\'t share with yourself'); |
| 202 |
|
} |
| 203 |
|
|
| 204 |
|
// The path should be set |
| 205 |
|
if ($share->getNode() === null) { |