Simple NodeAccess
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
Releases
| Version | Type | Core | Release date | |
|---|---|---|---|---|
| 1.0.0-rc1 | Pre-release | Aug 12, 2023 |