Assign shortcut set to role

Created on 10 April 2011, about 13 years ago
Updated 22 August 2023, 10 months ago

Problem/Motivation

A shortcut set can be assigned to an individual user, but there is no way to assign a shortcut set as the default for a specific role.

Proposed resolution

The Shortcut Per Role β†’ module solves this problem in Drupal contrib. However, this module has a serious limitation which, IMHO, excludes it from consideration for inclusion into Drupal core until it can be resolved properly in contrib.

The Shortcut Per Role module works well when each user is generally assigned a single role like "administrator", "content editor", "moderator", "user admin", etc. However that module become complicated and less useful if your roles and permissions model is such that each user has multiple roles. This is the strategy that was adopted with Acquia's Lightning distro, where each content type on the site had a "Type creator" and "Type editor" role. This permissions approach allows for fine-grain control for large teams, but makes building competing shortcut sets per role a very challenging problem. The module currently handles this issue by inheriting the shortcut set assigned to the highest weighted role, but at least one person found this annoying and would rather combine sets. Combining sets comes with its own set of issues as well, such as the order links should appear in, the strategy to reduce duplicate links, and the UX issue caused when a user has many roles making the shortcut list of links extremely long and untenable inside a Toolbar.

Probably the only sane approach is to either allow the user to select from a list of shortcut sets that have been allowed for one or more of the roles they have, or have a dropdown to let users swap out shortcut sets right from the shortcut bar itself.

Remaining tasks

Decide on an approach to handle multiple qualifying shortcut sets for users that have multiple roles.

User interface changes

TBD.

API changes

TBD.

Data model changes

TBD.

Release notes snippet

TBD.

Original report by @mariomaric

Posted by zenlan β†’ on February 9, 2011 at 2:07pm @ d.o forum β†’ :

I am able to assign a shortcut set to an individual user but can't find a way to assign that shortcut set as the default for a specific role.

Is it possible to assign a shortcut set to a role via configuration?

✨ Feature request
Status

Active

Version

11.0 πŸ”₯

Component
ShortcutΒ  β†’

Last updated about 1 month ago

  • Maintained by
  • πŸ‡΅πŸ‡°Pakistan @jibran
Created by

πŸ‡­πŸ‡·Croatia mariomaric

Live updates comments and jobs are added and updated live.
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.

  • πŸ‡ͺπŸ‡ΈSpain zuruckzugehen

    Replying to #39, I think the merge solution is not a good one.
    You can end up with two many links and there is no way to decide the order, the way you do with a menu in Drupal -what it is, in the end, the shortcuts menu.

    I think the solution would be having a select element with all the roles a user has and seeing the shortcuts for each role separately. The roles could be ordered by weight or by alphabetical order (perhaps in an environment with many rols the alphabetical is clearer). Of course, the default set of shortcuts would be the ones belonging to the first role in the select element.

Production build 0.69.0 2024