Skip to content
Snippets Groups Projects
Verified Commit 30ac531e authored by Dave Long's avatar Dave Long
Browse files

Issue #3395431 by acbramley, smustgrave, larowlan: BlockContent JSON:API...

Issue #3395431 by acbramley, smustgrave, larowlan: BlockContent JSON:API collection endpoint doesn't return unpublished block when filtered without administer block content permission

(cherry picked from commit 257191b8)
parent 4456b257
Branches
Tags
20 merge requests!8376Drupal views: adding more granularity to the ‘use ajax’ functionality,!8300Issue #3443586 View area displays even when parent view has no results.,!7567Issue #3153723 by quietone, Hardik_Patel_12: Change the scaffolding...,!7565Issue #3153723 by quietone, Hardik_Patel_12: Change the scaffolding...,!7509Change label "Block description" to "Block type",!7344Issue #3292350 by O'Briat, KlemenDEV, hswong3i, smustgrave, quietone: Update...,!6922Issue #3412959 by quietone, smustgrave, longwave: Fix 12 'un' words,!6848Issue #3417553 by longwave: Remove withConsecutive() in CacheCollectorTest,!6720Revert "Issue #3358581 by pfrenssen, _tarik_, a.dmitriiev, smustgrave:...,!6560Update ClaroPreRender.php, confirming classes provided are in array format,!6528Issue #3414261 by catch: Add authenticated user umami performance tests,!6501Issue #3263668 by omkar-pd, Wim Leers, hooroomoo: Re-enable inline form errors...,!6354Draft: Issue #3380392 by phma: Updating language weight from the overview reverts label if translated,!6324Issue #3416723 by Ludo.R: Provide a "node type" views default argument,!6119Issue #3405704 by Spokje, longwave: symfony/psr-http-message-bridge major version bump,!5950Issue #3403653 by alexpott, longwave: Incorporate improvements to how contrib runs PHPStan to core,!5858Issue #3401971 by fjgarlin: Test-only job shouldn't require constant rebases...,!5716Draft: Issue #3401102 by Spokje, longwave, smustgrave: Nightwatch artifacts on GitLab not retained,!5674Transaction autocommit during shutdown relies on unreliable object destruction order,!5644Issue #3395563 by nireneko, marvil07, lauriii, borisson_, smustgrave, Wim...
Pipeline #36556 failed
Pipeline: drupal

#36568

    Pipeline: drupal

    #36567

      Pipeline: drupal

      #36566

        +1
        ......@@ -183,6 +183,7 @@ function jsonapi_jsonapi_block_content_filter_access(EntityTypeInterface $entity
        // \Drupal\jsonapi\Access\TemporaryQueryGuard adds the condition for
        // (isReusable()), so this does not have to.
        return ([
        JSONAPI_FILTER_AMONG_ALL => AccessResult::allowedIfHasPermission($account, 'access block library'),
        JSONAPI_FILTER_AMONG_PUBLISHED => AccessResult::allowed(),
        ]);
        }
        ......
        ......@@ -68,6 +68,11 @@ class BlockContentTest extends ResourceTestBase {
        protected function setUpAuthorization($method) {
        switch ($method) {
        case 'GET':
        $this->grantPermissionsToTestedRole([
        'access block library',
        ]);
        break;
        case 'PATCH':
        $this->grantPermissionsToTestedRole([
        'access block library',
        ......@@ -86,6 +91,14 @@ protected function setUpAuthorization($method) {
        }
        }
        /**
        * {@inheritdoc}
        */
        protected function setUpRevisionAuthorization($method) {
        parent::setUpRevisionAuthorization($method);
        $this->grantPermissionsToTestedRole(['view any basic block content history']);
        }
        /**
        * {@inheritdoc}
        */
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please register or to comment