Auto-prefill permission checkboxes based on "permission levels" and "role levels".

Created on 12 November 2009, over 15 years ago
Updated 9 June 2025, 25 days ago

I noticed that I spend too much time ticking checkboxes on the permissions page. Especially, when the site has a lot of custom roles such as "community member", "paying customer", "content editor", "employee", "partner" etc.

A lot of the checkboxes could be prefilled with useful values, if hook_perm would return more useful information. At first I thought, Drupal should define more role presets (in addition to "anonymous user" and "logged-in user"), and then hook_perm would define which of these roles get this permission by default. But, that's not even necessary!

Here's the idea:
- Hook_perm returns a number between 0 for "unlimited access" an 10 for "admin only".
- Each role you create gets a number between 0 and 10.
- Whenever a new permission or role is created, the respective new role/perm checkboxes are filled with computed values: If the role has a higher level than the permission, the value is set to TRUE (checked), otherwise to FALSE (not checked).

This would solve the problem for many use cases. And, the numbers could even be used to decorate the permissions page with some nice colors, visualizing which of the permissions are critical for security and which are not, and which of the checkbox values match or mismatch with the ("recommended") computed values.

✨ Feature request
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

base system

Created by

πŸ‡©πŸ‡ͺGermany donquixote

Live updates comments and jobs are added and updated live.
  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thank you for sharing your idea for improving Drupal.

    We are working to decide if this proposal meets the Criteria for evaluating proposed changes. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or there is no community support. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

Production build 0.71.5 2024