Indicate protected layout (at least on hover) in the frontend

Created on 5 May 2023, over 1 year ago
Updated 7 March 2024, 8 months ago

Problem/Motivation

For admins all protected layouts (with role selection) are always visible. This may lead to confusion, as with other roles you would not see these sections. Similar to unpublished.

So we should add an indicator similar to unpublished, but with "protected" label in the frontend. Is that possible?

For details the site builder can simply edit the layout, no further details needed, just an indication.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Postponed

Version

1.0

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

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

Comments & Activities

  • Issue created by @Anybody
  • 🇩🇪Germany Anybody Porta Westfalica

    Do it, if it's simple (e.g. by layout type / template). Do it much later, if it's complicated.

  • Issue was unassigned.
  • 🇩🇪Germany Anybody Porta Westfalica

    This is based on the permission:
    entity_by_access_role_field.ignore_permission
    from entity_by_access_role_field module.

    So if the user has that permission, he'll also see the hidden layout. But of course he'll also see layouts which he has a permission on, so when this indicator should not be shown. The logic isn't that simple though.

    As this will so surely take up more than 15-30 min of work, we should not implement this, until we have nothing else to do ;)

  • Status changed to Postponed over 1 year ago
  • Not cleanly solvable without any flags or methods I can use in the template.

    The Entity Access module should set flags like
    - access_is_restricted (bool)

    Probably
    - access_for_roles (arr)
    - access_for_roles_inverted (bool)
    if we want to list the restricted roles.

    Or a method like ENTITY.isPublished()

Production build 0.71.5 2024