node_secure
Node Secure
A Drupal module that provides an additional layer of protection against accidental or unauthorized node deletion by allowing administrators to protect entire content types.
Node Secure is intended for site builders and administrators who need to ensure that important content remains available and cannot be deleted through Drupal's user interface, administrative listings, bulk operations, or direct deletion URLs.
When should I use this module?
Node Secure is designed for situations where entire content types should be protected from deletion.
Common use cases include:
* Corporate pages that should never be removed accidentally.
* Legal or compliance-related content.
* Product catalog content.
* Event archives and historical records.
* Documentation and knowledge base content.
* Policy and governance documents.
Instead of protecting individual nodes, Node Secure protects all nodes belonging to selected content types.
Features
* Protect specific content types from deletion.
* Administrative configuration form for selecting protected content types.
* Hide the Delete tab on protected node pages.
* Hide the Delete button on node edit forms.
* Block delete operations from administrative content listings.
* Prevent deletion through bulk operations.
* Restrict access to direct node deletion URLs.
* Integrate with Drupal's node access system.
* Support dynamic configuration changes.
* Cache-safe implementation.
* Compatible with existing Drupal content workflows.
Requirements
* Drupal 10 or Drupal 11
No additional requirements:
* No contributed module dependencies.
* No external libraries.
* No third-party APIs.
* No external services.
Installation
drush en node_secure -y
Navigate to:
/admin/config/content/node-secure
Select the content types you want to protect and save the configuration.
Post-Installation
After configuration:
* Delete tabs are removed from protected node pages.
* Delete buttons are removed from edit forms.
* Delete operations are blocked from administrative content listings.
* Bulk delete actions cannot delete protected nodes.
* Direct access to deletion routes is denied.
No additional content types, text formats, or permissions need to be configured.
Recommended Modules
Node Secure works independently, but the following modules may complement its functionality:
* Content Moderation
* Workflows
* Content Access
* Scheduler
These modules help manage editorial workflows while Node Secure protects content from deletion.
Similar projects
When should I use Node Secure instead of Node Keep?
Both modules help prevent unwanted content deletion, but they use different protection models.
Choose Node Secure when:
* Entire content types should be protected.
* All Page nodes should be protected.
* All Event nodes should be protected.
* All Product nodes should be protected.
* Content retention policies apply to a complete content type.
Choose Node Keep when:
* Only specific nodes require protection.
* Other nodes of the same content type should remain deletable.
* Protection decisions are made on a node-by-node basis.
Node Secure protects content by content type, while Node Keep protects individual nodes.
Limitations
* Protection is applied at the content type level.
* Does not provide per-node protection.
* Does not provide content archiving or backup functionality.
* Does not replace editorial workflow or moderation tools.
* Does not prevent content editing; it only prevents deletion.
Supporting this Module
Contributions are welcome through:
* Bug reports
* Feature requests
* Documentation improvements
* Testing and feedback
* Code contributions