Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

The module is part of the User Privacy CMS recipe.

This module introduces a view username access decider that grants access to view a user’s username if that user is the author of a node to which the current (or acting) user has view access. For more details, see the Known limitations section.

Note: This module MUST ONLY be enabled if the site owner confirms that every node author’s username can become visible based on the logic described above.

TODOs

  • Validate and finalize support for node revisions if needed. For example, a user might be able to view the username of another user because that user is the author of a non-default revision of a node.
    • This should be handled by a dedicated decider that runs after the current node access-based decider, but only if necessary, because this lookup can be very expensive.

Known limitations

  • Currently, only the “view” entity access for nodes is checked to decide whether a user can view another user’s username.
    This limitation is set by default for performance reasons, as checking “view,” “update,” and “delete” access simultaneously could be expensive. Additionally, it might be unnecessary to expose an author’s username to users who only have “update” or “delete” access to a node. If this feature is needed, a new instance of the \Drupal\view_usernames_node_author\NodeAuthorViewUsernameAccessDecider service can be registered to override the default entity operation used by the service via the \Drupal\view_usernames_node_author\NodeAuthorViewUsernameAccessDecider::setEntityOperation() method.
  • The Internal Page Cache (page_cache) module does not support cache context-based “invalidation” of cached requests. When a user’s access to a node changes via hook_node_access_grants(), previously cached results DO NOT get invalidated for non-logged-in users (since the Internal Page Cache is only active for non-logged-in users). However, the Dynamic Page Cache (dynamic_page_cache) module works as expected for authenticated users. See cache context is being ignored.

Activity

Total releases
1
First release
Dec 2025
Latest release
4 months ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
1.0.1 Stable Dec 14, 2025