In Account Settings an administrator sets up a special name for anonymous users. Yet, on the Permissions page the table header is Anonymous User no matter what the value of this field is. It might make more sense to change this heading to match the value typed in the Account Settings Field. For example, if the admin uses "Guest" as the name for anonymous users, then the Permissions page would use "Guest" as the table header, reflecting the chosen name of this role.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

amc’s picture

Issue tags: +Usability

forgot tag

yoroy’s picture

could you check if #228061: Usability UMN: Allow roles to be weighted touches on this please.

amc’s picture

#228061: Usability UMN: Allow roles to be weighted is a similar issue, but seems more concerned with the order of the columns than the heading names. (Admittedly, there's a bit of talk regarding changing some, like the first comment, but according to the bulk of discussion and the title it's really about the order.) I don't see any mention of alternatives for the anonymous user, either.

If we want to expand this issue into a general "lets rename all the default roles" one, I think that would be fine. (I happen to like the "registered users" suggestion in the other thread.) But the order and the names should probably remain separate but related issues, at least in my mind. Whatever order we present them in should be based on logic and not on whatever the roles are called.

yoroy’s picture

thanks for investigating. Renaming stuff is not feasible anymore, since strings are frozen. So this issue should focus on the initial request as well: use the custom label for the anonymous role.

amc’s picture

Version: 7.x-dev » 8.x-dev

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

dpi’s picture

Version: 8.2.x-dev » 7.x-dev
Component: user system » user.module
Issue summary: View changes

You can change the label of the Anonymous role in Drupal 8. The label is correctly reflected to the permissions list.

Moving back to Drupal 7 per #749298-4: Anonymous user name should be used on permissions screen

amit0212’s picture

Defines the permissions assigned to each role. Typically, you will implement all
permissions for your site in this hook.

This hook takes a $role string as an argument. You should respond with the
appropriate permissions grants for that role. You should only return grants
that are TRUE.

function example_secure_permissions($role) {
    $permissions = array(
      'anonymous user' => array(
        'access content',
        'use text format 1',
      ),
      'authenticated user' => array(
        'access comments',
        'access content',
        'post comments',
        'post comments without approval',
        'use text format 1',
      ),
      'editor' => array(
        'bypass node access',
        'administer nodes',
      ),
      'producer' => array(
        'create page content',
        'edit any page content',
      ),
    );
    if (isset($permissions[$role])) {
      return $permissions[$role];
    }
  }

NOTE: The use of isset() is recommended here, since the hook will fire
once per role, and it is possible that your module will not reply in all cases.

NOTE: If configured to do so, the module will return the default permissions
defined by Drupal's installer. Disable the 'Reload default permissions on
rebuild' setting to disable this behavior.

djalxs’s picture

Here's a patch that modifies user_roles(), however this code would also modify any other places that the function is called, including but not limited to the block & filter modules.

klonos’s picture

Version: 7.x-dev » 10.1.x-dev
Issue tags: +Needs backport to D7
FileSize
26.28 KB

This request is about changing the label of the "Anonymous" role (as shown in the permissions page) to reflect the setting in /admin/config/people/accounts . That setting though is meant to describe a user (the special user with UID 0) - NOT to describe the role (the anonymous role label can be changed via admin/people/roles/manage/anonymous ). So these aren't the same thing.

Also, this statement from #749298-8: Anonymous user name should be used on permissions screen is not true (sort of - I would say that it's just missing the point):

You can change the label of the Anonymous role in Drupal 8. The label is correctly reflected to the permissions list.

...you can change the label of the role from the role listing/management page, but this issue here is referring to the setting in the "Account settings" form ( /admin/config/people/accounts ). Apples and oranges 😅 ...anyway, since the issue was assigned to D7 based on that comment, re-assigning back to D10, where this is still an issue. Also adding the backport to D7 tag, but I've heard that the process has changed, so if I need to raise a separate issue for D7 do let me know.

We've had this discussion in Backdrop-land (see https://github.com/backdrop/backdrop-issues/issues/3511 for details), and we concluded that:

  1. This setting is NOT to be confused with the label of the Anonymous user role. What this setting does is to control what is shown as username in the "Submitted by" area (author and date information) of content and comments.
  2. It would be best to improve the user-facing text of that form element for that setting instead (fieldset legend, field label, help text). Here's what we currently have as a proposal, which I believe clarifies things and reduces the chances for confusion:

I hope this helps. If we agree on the approach and the wording, I can provide a merge request. Let me know.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative, +Needs tests, +Needs issue summary update

This issue is being reviewed by the kind folks in Slack, #need-reveiw-queue. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge require as a guide.

Tagging for IS as this originally appeared for D7, but what needs to happen for D10 now? So remaining tests.

Also tagging for tests.

Kristen Pol’s picture

@smustgrave Thanks for updating. This is marked as a Feature request so why does it need tests?

smustgrave’s picture

Seems to be adding new functionality. So would need coverage to make sure that functionality never breaks in the future.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.