The Deny Access module (Drupal 7 only!) allows overriding access granted by other node access modules and/or core. It uses the node access system but not the {node_access} table, and so if you don't have any other node access module installed, then it does not carry the typical overhead. The downside is that it will not work to guard against showing lists of nodes, like lists created by the Views module or the front page. At this point it's a very simple module.

Deny Access provides the following global 'permissions' on the Permissions page, admin/people/permissions#module-deny_access:

  • DENY accessing any content
    Override content view access (to single nodes!) granted by other modules.
  • DENY creating any content
    Override content create access granted by other modules.
  • DENY editing any content
    Override content edit access granted by other modules.
  • DENY deleting any content
    Override content delete access granted by other modules.
  • DENY access per content type
    Generally override access (to single nodes only!) for a specific content type.

They can be used to

  • close off access for any given role, or to
  • create roles like 'read-only' or 'no access' to assign to any user

to quickly restrict access without disturbing any other settings.

Deny Access does not override the 'Bypass content access control' permission, though. That permission is intended to be all-powerful, and Deny Access does not interfere there.

Possible Enhancements

There are various ways in which Deny Access could be enhanced:

  • offer content-type-specific deny 'permissions'
  • offer realm-specific deny 'permissions'
  • offer denies that are independent of the permissions system: they could
    • apply to a list of groups or users
    • apply to certain content types
    • apply to certain nodes
    • apply to certain times of day
  • integrate with Trigger module

Let's discuss this in the issues queue.

Deny Access for Drupal 8

We need help for moving Deny Access to D8 and supporting it there. Please help finish up a D7 release and start work on D8.

Supporting organizations: 
sponsors development and maintenance

Project information

  • caution Seeking co-maintainer(s)
    Maintainers are looking for help reviewing issues.
  • caution Maintenance fixes only
    Considered feature-complete by its maintainers.
  • Project categories: Access control
  • chart icon59 sites report using this module
  • Created by salvis on , updated
  • shieldStable releases for this project are covered by the security advisory policy.
    There are currently no supported stable releases.

Releases