Skip to content

Entity Access Password

The Entity Access Password module allows to restrict access to fieldable entities by requiring to enter a password.

It is the Drupal port/rewrite of the Protected Node module and is expanding the feature to any fieldable entity types, not just nodes. See Migrating from Protected Node.

The module provides a new field type: Password protection.

The administrator can choose per field instance the behavior:

  • the password level (can be cumulative):
    • entity password
    • bundle password
    • global password
  • the protected view modes

When a protected content is displayed, if the user does not have access then it is the "Password protected" view mode that is displayed instead. See Password protected view mode.

That way, it offers a very flexible way to control how the password form is displayed.

To set up the protection step by step, see Getting started. If the protection does not work as expected, see the Frequently asked questions.

Access storage backends

You need to enable at least one module providing an access backend to store the accesses granted by entering a password. By default, there are two sub-modules providing an access backend:

  • Entity Access Password Session Backend (entity_access_password_session_backend): allows to store granted access in the session. The accesses are invalidated when the password changes.
  • Entity Access Password User Data Backend (entity_access_password_user_data_backend): allows to store granted access in the user data backend for more persistent access storage. Does nothing for anonymous users. The invalidation of the accesses when the password changes is configurable. See User data backend.