Code Duplication    Length = 4-4 lines in 2 locations

lib/private/Share20/Manager.php 2 locations

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