Problem/Motivation

When Rabbit Hole is configured to perform an action and a content admin views a page where that action would perform for a visitor, it is not clear to the staff admin what action will perform for an anonymous visitor.

Proposed resolution

Add a message on pages that would perform an action indicating what that action would be.

Remaining tasks

Work out how to do this.
Provide a patch.

User interface changes

When someone who has admin access and would not be affected by normal page actions, views a page where an action would perform, they will see a message explaining what that action would be.

warning message

Configuration form:
config form

API changes

TBD

Data model changes

n/a

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

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

FYI in Field Redirection we display this message to admins:

This page is set to redirect to another URL, but you have permission to see this page and will not be automatically redirected.

anybody’s picture

Thank you @DamienMcKenna once again, just ran into exactly the same idea! Once again hero of the day and +1 here!

anybody’s picture

matroskeen’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
Status: Active » Needs work

I really like the idea! This feature will be included in 2.0.x version.

I'll submit an MR with the proof of concept shortly. The next steps would be:
1) Decide on what level it would be configured. Possible options: a) global (save in rabbit_hole.settings); b) bundle (save in rabbit_hole.behavior_settings.*). Also, keep in mind #3099245: Add option to apply rabbit hole behaviors to all users including administrators as both features are mutually exclusive if they're applied globally.

2) Add configuration option and adjust conditions;

3) Decide on the message wording. It should look good and clear for all available actions, potentially including custom ones.

Current message:

This page is set to apply "@action" action, but you have permission to see this page.

Possible actions: "Page not found", "Access Denied", "Page redirect".

4) Add test coverage.

matroskeen’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new12.94 KB
new60.6 KB

Adding screenshots to the issue description

  • Matroskeen committed 8d0bce68 on 2.0.x
    Issue #3341902 by Matroskeen: Add message for admins to indicate what...
matroskeen’s picture

Status: Needs review » Fixed

1) There is a new checkbox, saved in the bundle settings;
2) Done;
3) Suggestions/improvements will be accepted in the follow-up issue;
4) Done.

Thank you!

Status: Fixed » Closed (fixed)

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