Request to add permission for users to bypass the redirect

Created on 7 August 2023, about 1 year ago
Updated 18 September 2024, about 2 months ago

Problem/Motivation

Module works great to redirect all users to a specified URL. If an admin or user that is part of the Content management views the piece of content they are also redirected. There are scenarios where system users may need to view the nodes.

Proposed resolution

Add a permission to allow specific roles to bypass the redirect.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @unexjp
  • First commit to issue fork.
  • Status changed to Needs review 4 months ago
  • I've created a custom permission called 'Bypass entity view redirect' and implemented it in an event subscriber to check with $this->currentUser->hasPermission('bypass entity view redirect'). If the user possesses this permission, the redirection logic is bypassed. I've also included the current user service in the event subscriber and updated the services.yml accordingly. This successfully bypasses redirection for all roles except administrators, who have this permission assigned by default
    Please review this

  • Assigned to rajdip_755
  • Status changed to RTBC 2 months ago
  • 🇮🇳India rajdip_755

    Hi @uttam,

    I have reviewed the MR !3 and applied the same as the patch. It's applied successfully.

    Drupal version: 10.3.0
    Module version: 1.0.0-beta3

    After applying the patches a new permission is available to bypass the entity view redirect and the feature is working fine, attaching here the screen recording of before and after applying the patch.

    I'm moving this to RTBC.

    Thanks !

  • Status changed to Fixed about 2 months ago
  • 🇮🇳India arunkumark Coimbatore

    Thanks for working on the Issue. I deployed the MR.

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

Production build 0.71.5 2024