Code Duplication    Length = 4-4 lines in 2 locations

lib/private/Share20/Manager.php 2 locations

@@ 231-234 (lines=4) @@
228
		}
229
230
		// Check if we actually have share permissions
231
		if (!$share->getNode()->isShareable()) {
232
			$message_t = $this->l->t('You are not allowed to share %s', [$share->getNode()->getPath()]);
233
			throw new GenericShareException($message_t, $message_t, 404);
234
		}
235
236
		// Permissions should be set
237
		if ($share->getPermissions() === null) {
@@ 253-256 (lines=4) @@
250
		}
251
252
		// Check that we do not share with more permissions than we have
253
		if ($share->getPermissions() & ~$permissions) {
254
			$message_t = $this->l->t('Cannot increase permissions of %s', [$share->getNode()->getPath()]);
255
			throw new GenericShareException($message_t, $message_t, 404);
256
		}
257
258
259
		// Check that read permissions are always set