Remove automatic administrator bypass for role-based menu item access control

Created on 2 September 2024, 26 days ago
Updated 3 September 2024, 26 days ago

Problem/Motivation

This task is specific to my project needs, where I require the removal of the automatic administrator bypass for role-based menu item access control in the menu_item_role_access module. In my project, administrators should adhere to the same role-based restrictions as other users to enforce specific access control policies.

Steps to reproduce

  1. Install and enable the menu_item_role_access module.
  2. Assign a menu item with restricted access to specific roles, excluding the administrator role.
  3. Log in as an administrator.
  4. Notice that the administrator can still see the restricted menu item, bypassing the role-based access control.

Proposed resolution

The proposed resolution is to remove the check that automatically allows administrators to bypass role-based restrictions. This change is necessary to ensure that role-based menu item access controls are consistently applied to all users in this specific project.

Remaining tasks

  1. Remove the administrator bypass check from the menuLinkCheckAccess method.
  2. Create a patch for the module with this change.
  3. Test the patch to ensure it does not introduce any regressions and that it correctly restricts menu access for administrators based on roles.
  4. Apply the patch in the project’s environment.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ“Œ Task
Status

Closed: won't fix

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡·Costa Rica thony1199

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

Comments & Activities

Production build 0.71.5 2024