|
@@ 240-243 (lines=4) @@
|
| 237 |
|
} |
| 238 |
|
|
| 239 |
|
// Check if we actually have share permissions |
| 240 |
|
if (!$share->getNode()->isShareable()) { |
| 241 |
|
$message_t = $this->l->t('You are not allowed to share %s', [$share->getNode()->getPath()]); |
| 242 |
|
throw new GenericShareException($message_t, $message_t, 404); |
| 243 |
|
} |
| 244 |
|
|
| 245 |
|
// Permissions should be set |
| 246 |
|
if ($share->getPermissions() === null) { |
|
@@ 262-265 (lines=4) @@
|
| 259 |
|
} |
| 260 |
|
|
| 261 |
|
// Check that we do not share with more permissions than we have |
| 262 |
|
if ($share->getPermissions() & ~$permissions) { |
| 263 |
|
$message_t = $this->l->t('Cannot increase permissions of %s', [$share->getNode()->getPath()]); |
| 264 |
|
throw new GenericShareException($message_t, $message_t, 404); |
| 265 |
|
} |
| 266 |
|
|
| 267 |
|
|
| 268 |
|
// Check that read permissions are always set |