|
@@ 210-213 (lines=4) @@
|
| 207 |
|
} |
| 208 |
|
|
| 209 |
|
// Check if we actually have share permissions |
| 210 |
|
if (!$share->getNode()->isShareable()) { |
| 211 |
|
$message_t = $this->l->t('You are not allowed to share %s', [$share->getNode()->getPath()]); |
| 212 |
|
throw new GenericShareException($message_t, $message_t, 404); |
| 213 |
|
} |
| 214 |
|
|
| 215 |
|
// Permissions should be set |
| 216 |
|
if ($share->getPermissions() === null) { |
|
@@ 232-235 (lines=4) @@
|
| 229 |
|
} |
| 230 |
|
|
| 231 |
|
// Check that we do not share with more permissions than we have |
| 232 |
|
if ($share->getPermissions() & ~$permissions) { |
| 233 |
|
$message_t = $this->l->t('Cannot increase permissions of %s', [$share->getNode()->getPath()]); |
| 234 |
|
throw new GenericShareException($message_t, $message_t, 404); |
| 235 |
|
} |
| 236 |
|
|
| 237 |
|
// Link shares are allowed to have no read permissions to allow upload to hidden folders |
| 238 |
|
if ($share->getShareType() !== \OCP\Share::SHARE_TYPE_LINK && |