This project is not covered by Drupal’s security advisory policy.

Automatically revoke user roles based on their content editing activity within a configurable time threshold, ensuring only active users retain their roles.

Features

The Role Revocation module automates the process of revoking user roles based on their inactivity. It uses node revision data to determine whether users have edited content within a specified time threshold.

  • Configurable time threshold: Set a specific number of days after which roles are revoked if no content edits are detected.
  • Selective role revocation: Choose which roles should be subject to revocation.
  • Privileged roles: Define roles that are exempt from revocation, ensuring key users retain their access.
  • Cron integration: Option to enable the revocation process to run automatically via cron.

Post-Installation

  1. Access configuration: Navigate to `Configuration -> People -> Role revocation settings`.
  2. Enable cron: Check the box to enable the revocation process via cron.
  3. Set roles to revoke: Select the roles that should be revoked if the user is inactive.
  4. Define privileged roles: Select roles that should always retain their assigned roles.
  5. Set expiration threshold: Enter the number of days of inactivity after which roles should be revoked.

Once configured, the module will use the defined settings to check for inactive users and revoke roles as necessary. You can also manually trigger the process by running the Drush command role_revocation:revoke.

Additional requirements

  • Revocation is based on node revision data. Therefore it's required to have node revisioning on.
  • This module utilises custom table for determining when the role assignment was done. This timestamp is taken into account not to revoke recently assigned roles. All assignments get set to current time on install making this module active only after the time threshold has passed.
Supporting organizations: 
Development

Project information

Releases