@@ 268-271 (lines=4) @@ | ||
265 | } |
|
266 | ||
267 | // Check if we actually have share permissions |
|
268 | if (!$share->getNode()->isShareable()) { |
|
269 | $message_t = $this->l->t('You are not allowed to share %s', [$share->getNode()->getPath()]); |
|
270 | throw new GenericShareException($message_t, $message_t, 404); |
|
271 | } |
|
272 | ||
273 | // Permissions should be set |
|
274 | if ($share->getPermissions() === null) { |
|
@@ 290-293 (lines=4) @@ | ||
287 | } |
|
288 | ||
289 | // Check that we do not share with more permissions than we have |
|
290 | if ($share->getPermissions() & ~$permissions) { |
|
291 | $message_t = $this->l->t('Cannot increase permissions of %s', [$share->getNode()->getPath()]); |
|
292 | throw new GenericShareException($message_t, $message_t, 404); |
|
293 | } |
|
294 | ||
295 | if ($share->getNode() instanceof \OCP\Files\File) { |
|
296 | if ($share->getPermissions() & \OCP\Constants::PERMISSION_DELETE) { |