|
@@ 280-283 (lines=4) @@
|
| 277 |
|
} |
| 278 |
|
|
| 279 |
|
// Check if we actually have share permissions |
| 280 |
|
if (!$share->getNode()->isShareable()) { |
| 281 |
|
$message_t = $this->l->t('You are not allowed to share %s', [$share->getNode()->getPath()]); |
| 282 |
|
throw new GenericShareException($message_t, $message_t, 404); |
| 283 |
|
} |
| 284 |
|
|
| 285 |
|
// Permissions should be set |
| 286 |
|
if ($share->getPermissions() === null) { |
|
@@ 302-305 (lines=4) @@
|
| 299 |
|
} |
| 300 |
|
|
| 301 |
|
// Check that we do not share with more permissions than we have |
| 302 |
|
if ($share->getPermissions() & ~$permissions) { |
| 303 |
|
$message_t = $this->l->t('Can’t increase permissions of %s', [$share->getNode()->getPath()]); |
| 304 |
|
throw new GenericShareException($message_t, $message_t, 404); |
| 305 |
|
} |
| 306 |
|
|
| 307 |
|
|
| 308 |
|
// Check that read permissions are always set |