Drupal is a registered trademark of Dries Buytaert
cms 2.1.0 Update released for Drupal core (2.1.0)! menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.0 Minor update available for module eca (3.1.0). sophron 3.1.1 Minor update available for module sophron (3.1.1). ai 1.3.1 Minor update available for module ai (1.3.1). seven 2.0.0-beta6 New beta version released for theme seven (2.0.0-beta6). seven 1.0.1-beta1 First beta version released for theme seven (1.0.1-beta1). crop Module crop crossed 1,000 active installs. entity_reference_revisions Module entity_reference_revisions crossed 1,000 active installs. address Module address crossed 1,000 active installs. admin_toolbar Module admin_toolbar crossed 1,000 active installs. editoria11y 3.0.0-beta8 New beta version released for module editoria11y (3.0.0-beta8). adv_varnish 4.0.15 Minor update available for module adv_varnish (4.0.15). editoria11y 3.0.0-beta7 New beta version released for module editoria11y (3.0.0-beta7). modeler_api 1.1.0 Minor update available for module modeler_api (1.1.0). form_mode_control 8.x-2.6 Minor update available for module form_mode_control (8.x-2.6). symfony_mailer_log 1.2.4 Minor update available for module symfony_mailer_log (1.2.4). cms_content_sync 3.2.1 Minor update available for module cms_content_sync (3.2.1). modal_page 5.1.9 Minor update available for module modal_page (5.1.9). drupal_cms_helper 2.1.0 Minor update available for module drupal_cms_helper (2.1.0).

Provides a permission per user role that controls whether a visitor can view
the profile of users who carry that role.

How it works

When this module is enabled, one permission is generated for every custom role
(excluding the built-in *Anonymous* and *Authenticated* roles):

View user profiles with role [Role name]

A viewer may see a profile if they hold the permission for at least one of
the profile user's roles. If the profile user has no custom roles the module
defers to Drupal core's own access rules.

Example

Viewer role Permission granted Can view Author profiles Can view Administrator profiles Anonymous
  • view user profiles with role author
Yes No Authenticated
  • (none)
No No Manager
  • view user profiles with role author
  • view user profiles with role administrator
Yes Yes

Configuration

Requires Drupal 11.1+ (uses OOP hooks via PHP attributes).

  1. Enable the module: `drush en access_user_profiles_by_role`
  2. Go to Administration → People → Permissions
  3. Grant the desired View user profiles with role … permissions to the appropriate roles.

Notes

  • Users can always view their own profile regardless of these permissions.
  • Users with the Administer users permission are unaffected; core handles their access as usual.
  • Permissions are generated dynamically, so adding or removing a role will update the permissions list after a cache rebuild (drush cr).

Activity

Total releases
1
First release
Mar 2026
Latest release
12 hours ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
1.0.0 Stable Mar 25, 2026