Code Duplication    Length = 10-10 lines in 2 locations

eZ/Publish/Core/MVC/Symfony/Controller/Content/ViewController.php 1 location

@@ 338-347 (lines=10) @@
335
            );
336
337
            // Check both 'content/read' and 'content/view_embed'.
338
            if (
339
                !$this->authorizationChecker->isGranted(
340
                    new AuthorizationAttribute('content', 'read', array('valueObject' => $content))
341
                )
342
                && !$this->authorizationChecker->isGranted(
343
                    new AuthorizationAttribute('content', 'view_embed', array('valueObject' => $content))
344
                )
345
            ) {
346
                throw new AccessDeniedException();
347
            }
348
349
            // Check that Content is published, since sudo allows loading unpublished content.
350
            if (

eZ/Publish/Core/MVC/Symfony/FieldType/RichText/Renderer.php 1 location

@@ 383-392 (lines=10) @@
380
        );
381
382
        // Check both 'content/read' and 'content/view_embed'.
383
        if (
384
            !$this->authorizationChecker->isGranted(
385
                new AuthorizationAttribute('content', 'read', array('valueObject' => $content))
386
            )
387
            && !$this->authorizationChecker->isGranted(
388
                new AuthorizationAttribute('content', 'view_embed', array('valueObject' => $content))
389
            )
390
        ) {
391
            throw new AccessDeniedException();
392
        }
393
394
        // Check that Content is published, since sudo allows loading unpublished content.
395
        if (