[2.x] Optional pattern for adding captcha administration links

Created on 8 March 2021, almost 4 years ago
Updated 3 May 2024, 8 months ago

Problem/Motivation

This module allows you to "Add CAPTCHA administration links to forms" which is super helpful, but sometimes overly broad. It would be great to have an optional field to provide one or more patterns that could be used to match the specific areas you want the links to appear.

Proposed resolution

When the "Add CAPTCHA administration links to forms" option is enabled, have a textarea appear where patterns can be provided. If left blank it would preserve the current behaviour, but if any patterns are entered, then the code that adds the links will check these before adding the link on a specific form.

Remaining tasks

- Add the additional form element, and use the states API to make it dependent on administration_mode being checked
- Add code to the form alter that adds the link, to make the comparison if any patterns are provided

User interface changes

API changes

Data model changes

Likely need to update the schema

✨ Feature request
Status

Needs work

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada mandclu

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024