Problem/Motivation

Currently the admin menu is shown for users having 'access administration menu'. This covers most of the cases. But there are situations when the access must be controlled by other modules code, based on other conditions. For example, an application may want to give such access based on complex OG rules.

Proposed resolution

Allow modules to put in place their own access policies but fallback to user_access('access administration menu').

Remaining tasks

None.

User interface changes

None.

API changes

New hook (see admin_menu.api.php): hook_admin_menu_access()

Data model changes

None.

Files: 

Comments

claudiu.cristea created an issue. See original summary.

claudiu.cristea’s picture

Status: Active » Needs review
FileSize
2.73 KB

Here's a patch.

claudiu.cristea’s picture

FileSize
2.7 KB
1.08 KB

Fix docs.

claudiu.cristea’s picture

Issue summary: View changes