user_filters() shows permission machine names rather than human labels, and tries to translate them

Created on 29 March 2013, about 11 years ago
Updated 17 April 2024, 2 months ago
    if ($permissions = $function('permission')) {
      asort($permissions);
      foreach ($permissions as $permission => $description) {
        $options[t('@module module', array('@module' => $module))][$permission] = t($permission);
      }

$permission is the permission machine name. We don't show that anywhere else in the UI, so we shouldn't show it here.

Furthermore, we shouldn't be trying to translate it!

hook_permission() provides us with the $description['label'], which comes already translated.

🐛 Bug report
Status

Needs review

Version

7.0 ⚰️

Component
User module 

Last updated 2 days ago

Created by

🇬🇧United Kingdom joachim

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

Merge Requests

Comments & Activities

Not all content is available!

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

Production build 0.69.0 2024