Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Release: ServiceM8 Webform Integration 1.2.1 — Minor update available for module servicem8_webform (1.2.1). Release: PostfixAdmin 1.0.0 — Initial release available for module postfix_admin (1.0.0)! Release: MCP Sentinel 2.28.2 — Minor update available for module mcp_sentinel (2.28.2). Release: Rightup theme 1.0.2 — Minor update available for theme vartheme_bs5_rightup (1.0.2). Release: ip_analyser 1.0.3 — Minor update available for module ip_analyser (1.0.3). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage. Module Revived: Liquid Voting 2.0.1 — Module liquid_voting updated after 6 months of inactivity (2.0.1).

Simple Node Access is a extremely simple module is focused on simplicity and performance.

It relies on hook_node_access + a simple configuration, maintaining the node_access tables untouched.

This works only on view/edit/delete pages, so nodes under access control won't be excluded from listings, like views.

Usage

The module is configured exclusively through a configuration entity. Edit this entity to change configuration.

To edit the entity run:

drush cedit simple_nodeaccess.settings

An editor will appear with the current content. On each role and operation you will be able to add a list of nodes that will be authorized/forbidden access.

The entity default config is:

anonymous:
  allowed_on:
    delete: { }
    update: { }
    view: { }
  forbidden_on:
    delete: { }
    update: { }
    view:
      - 25
authenticated:
  allowed_on:
    delete: { }
    update: { }
    view: { }
  forbidden_on:
    delete: { }
    update:
      - 26
    view: { }
administrator:
  allowed_on:
    delete:
      - 30
    update:
      - 30
    view: { }
  forbidden_on:
    delete: { }
    update: { }
    view: { }

If you want to forbid access to node 101 and 102 to anonymous users edit the configuration entity accordingly. For example, the anonymous role part can be:

...
anonymous:
  allowed_on:
    delete: {  }
    update: {  }
    view: {  }
  forbidden_on:
    delete: {  }
    update: {  }
    view:
      - 101
      - 102
---

Notice

As said above, this only applies on certain situations like direct access to a node page. Don't rely on this module you must forbid access to some content at any cost.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Aug 2023
Latest release
3 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core Release date
1.0.0-rc1 Pre-release Aug 12, 2023