Block service doesn't actually check block access before rendering dashboard blocks

Created on 5 November 2024, 10 days ago

Problem/Motivation

Fundamentally, block access is not checked before the dashboard block is rendered. If the block is placed in block layout then access is checked, but the result is irrelevant as the opigno_dashboard BlockService doesn't check anyway.

Steps to reproduce

For UserStatisticsBlock plugin, for example, just set blockAccess() to point blank return AccessResult::forbidden(). Observe the block still displays on dashboards.

Proposed resolution

Access check prior to block render.

🐛 Bug report
Status

Active

Version

3.2

Component

Code

Created by

🇬🇧United Kingdom mrhorse

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