Code Duplication    Length = 4-4 lines in 2 locations

lib/private/Share20/Manager.php 2 locations

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