|
@@ 191-194 (lines=4) @@
|
| 188 |
|
} |
| 189 |
|
|
| 190 |
|
// Cannot share with yourself |
| 191 |
|
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER && |
| 192 |
|
$share->getSharedWith() === $share->getSharedBy()) { |
| 193 |
|
throw new \InvalidArgumentException('Can\'t share with yourself'); |
| 194 |
|
} |
| 195 |
|
|
| 196 |
|
// The path should be set |
| 197 |
|
if ($share->getNode() === null) { |
|
@@ 583-586 (lines=4) @@
|
| 580 |
|
} |
| 581 |
|
|
| 582 |
|
// Cannot share with the owner |
| 583 |
|
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER && |
| 584 |
|
$share->getSharedWith() === $share->getShareOwner()) { |
| 585 |
|
throw new \InvalidArgumentException('Can\'t share with the share owner'); |
| 586 |
|
} |
| 587 |
|
|
| 588 |
|
// Generate the target |
| 589 |
|
$target = $this->config->getSystemValue('share_folder', '/') .'/'. $share->getNode()->getName(); |
|
@@ 670-673 (lines=4) @@
|
| 667 |
|
} |
| 668 |
|
|
| 669 |
|
// Cannot share with the owner |
| 670 |
|
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER && |
| 671 |
|
$share->getSharedWith() === $share->getShareOwner()) { |
| 672 |
|
throw new \InvalidArgumentException('Can\'t share with the share owner'); |
| 673 |
|
} |
| 674 |
|
|
| 675 |
|
$this->generalCreateChecks($share); |
| 676 |
|
|