| @@ 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 ( |
|
| @@ 362-371 (lines=10) @@ | ||
| 359 | ); |
|
| 360 | ||
| 361 | // Check both 'content/read' and 'content/view_embed'. |
|
| 362 | if ( |
|
| 363 | !$this->authorizationChecker->isGranted( |
|
| 364 | new AuthorizationAttribute('content', 'read', array('valueObject' => $content)) |
|
| 365 | ) |
|
| 366 | && !$this->authorizationChecker->isGranted( |
|
| 367 | new AuthorizationAttribute('content', 'view_embed', array('valueObject' => $content)) |
|
| 368 | ) |
|
| 369 | ) { |
|
| 370 | throw new AccessDeniedException(); |
|
| 371 | } |
|
| 372 | ||
| 373 | // Check that Content is published, since sudo allows loading unpublished content. |
|
| 374 | if ( |
|