Problem/Motivation
When editing a user as an admin (has the permission "administer users"), user protect applies protections and then outputs a message that says "%user has been protected from the following editing operations: @operations".
I'd like to disable this message on my site. We give the "administer users" permission to people on our sites that may be confused by the message. I can see how this message might be useful in some cases, like for user-specific protections, but for role-based protections which I use, it's not that helpful.
Steps to reproduce
Proposed resolution
Introduce a config option for the module that controls if this message is shown or not.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork userprotect-3447371
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
megachrizSounds reasonable to add a config option like that. I think that a global configuration option for this would make the most sense? That means we need a userprotect.settings config object and a form to set the configuration. And of course the set configuration needs to be respected in
userprotect_form_user_form_alter().Comment #5
oleksiyComment #6
megachriz@oleksiy
Thanks for your contribution! I've changed the setting name to "display_applied_protections_message" and I added test coverage.
Comment #7
megachrizThe code is scheduled to be merged. Thanks @oleksiy for your contribution!