Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module provides a way to restrict access to specific views based on individual users, rather than just roles or permissions. Site builders can select one or more users by their username to grant them access, and optionally allow anonymous users as well. This is useful for creating user-specific content, dashboards, or private blocks.

Views Access User adds a new "Access control" plugin for Views that lets site builders restrict access to specific users — without needing any roles or permissions.

Features

An additional access restriction type, "User" is available for site builders to select when configuring views access. Unlike the Permission or Role restriction, the new type allows site builders to select one or more individual users to restrict access to.

  • Restrict view access by individual user IDs
  • Add users using a username-based textarea in the Views UI
  • Enable anonymous access via a simple checkbox
  • Supports full autocomplete-to-ID mapping and validation
  • Integrates cleanly with the Views admin interface
  • Skips access checks for users with the "administer views" permission (for preview/edit)

Use Cases

  • Show content only to selected staff members
  • Create private blocks for individual users
  • Build user-specific dashboards or reports
  • Allow anonymous users to access specific views when needed

Usage

  • Go to Structure > Views
  • Edit or create a view
  • Under the Access settings, choose “User (Views Access User)”
  • Add usernames (one per line)
  • Optionally, check "Allow anonymous users"
  • Save and test the view with different user accounts

Access Rules

  • Only the listed users can access the view
  • Anonymous users are allowed only if that option is checked
  • Users with administer views permission always have access in the admin UI for preview purposes

Supporting this Module

If this module saves you time or adds value to your project, you can show your support in two ways:

  • Buy me a coffee to say thanks:
    https://buymeacoffee.com/tylerhastain
  • Want to contribute or sponsor development?
    Reach out directly if you're interested in helping improve or maintain the module — contributions, ideas, and support are always welcome!

Activity

Total releases
2
First release
Feb 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 2
Maintenance
Dormant

Releases

Version Type Release date
1.0.0-beta1 Pre-release May 11, 2025
1.0.x-dev Dev Feb 17, 2025