Skip to content

OC4 Dashboard -'Component not registered' when lacking permission #5925

@MartinK85

Description

@MartinK85

We have a plugin (https://octobercms.com/plugin/vdlp-redirect) containing two report widgets for use on the dashboard, one for displaying statistics and the other for creating new records. Up until now both widgets were covered by a single permission but we are attempting to split this into two permissions, one that allows full access to the plugin and a separate permission that only allows access to statistics.

Both report widgets are registered in the plugin's registerReportWidgets and have been assigned the correct permissions via the permissions-key.

For full context: https://github.com/vdlp/oc-redirect-plugin/pull/107/files

After adding the statistics widget to the dashboard as a user with all permissions and logging in as a user that only has the statistics-permission an error is displayed instead of the widget:

Image

Expected behaviour would be for the widget to not be shown at all if the user does not have the required permission.

All October packages are on v4.0.7.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions