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

Command icon 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

bkosborne created an issue. See original summary.

megachriz’s picture

Sounds 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().

oleksiy made their first commit to this issue’s fork.

oleksiy’s picture

Status: Active » Needs review
megachriz’s picture

@oleksiy
Thanks for your contribution! I've changed the setting name to "display_applied_protections_message" and I added test coverage.

megachriz’s picture

Status: Needs review » Fixed

The code is scheduled to be merged. Thanks @oleksiy for your contribution!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • megachriz committed 01d73afa on 8.x-1.x authored by oleksiy
    Issue #3447371 by oleksiy, megachriz: Added option to disable the status...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.