Add a new config option to disallow admins from changing password and email fields

Created on 14 May 2024, 10 months ago

Problem/Motivation

The module has options to "Restrict password management" and "Restrict email management" to hide access to these fields on the user edit form. But if the user has the "administer users" permission, they bypass this restriction. This is problematic for my use case, where I want to give some users the "administer users" permission so they can create/edit/delete users but don't want them to be able to edit the password and email fields.

Steps to reproduce

Proposed resolution

Add a new config option "Allow users with administer users permission to bypass the above password/email restrictions" that only appears when either the checkbox for "Restrict password management" or "Restrict email management" are checked. Have it disabled by default, but add an update hook to enable it for existing sites that have either of these checkboxes checked.

Adds some complexity here, but this preserves the existing behavior.

I think in a future major version of the module, we might consider just removing this new setting and just change the behavior so that it's never allowed to edit them by anyone.

Remaining tasks

User interface changes

A new setting "Allow users with administer users permission to bypass the above password/email restrictions".

API changes

Data model changes

✨ Feature request
Status

Active

Version

2.0

Component

CAS

Created by

πŸ‡ΊπŸ‡ΈUnited States bkosborne New Jersey, USA

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