ContentCreatorVisibleXbConfigEntityAccessControlHandler bypasses admin permissions for view

Created on 17 June 2025, 6 days ago

Overview

Code components are created with `status = false`. This leads to a 403 on creation because ContentCreatorVisibleXbConfigEntityAccessControlHandler does not respect the admin permission. It only checks `status`.

Proposed resolution

Use parent result and orIf for status check.

    $result = parent::checkAccess($entity, $operation, $account);
    return match($operation) {
      // We always allow viewing these entities, unless disabled.
      'view' => $result->orIf(
        AccessResult::allowedIf($entity->status())->addCacheableDependency($entity)
      ),
      default => $result,
    };

User interface changes

πŸ› Bug report
Status

Active

Version

0.0

Component

Page builder

Created by

πŸ‡ΊπŸ‡ΈUnited States mglaman WI, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024