Schedule automatic password removal

Created on 28 January 2025, 3 months ago

Problem/Motivation

Sometimes content managers are creating pages and they password protect them from public until a given time. This time sometimes it's in the night and it's incovenient to wake up and remove the password protection. We need to add the possibility to schedule page password removal automatically at a scheduled time.

Proposed resolution

We add a submodule called protected_pages_scheduler to implement this functionality on top. The module is implementing hook_cron in order to check removal.

User interface changes

When module is enabled, a new field is added to the edit form in order to allow content managers to schedule the publication

Remaining tasks

  1. Create submodule
  2. Test scheduler and document
  3. Test user interface (adding, removing date and time)
  4. Add project README.txt and explain CRON configuration (i.e. when CRON is not set to run every minute it might take up to X minutes to publish the content, where X is the CRON interval).
  5. Maybe add a warning in the UI if website is having the the poor man's CRON enabled?

API changes

  1. Modify ProtectedPagesStorage::insertProtectedPage to allow the new fields (maybe implement new hook protected_pages_insert?)

Data model changes

Create new column remove_time on protected_pages schema

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇷🇴Romania cristiroma

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024