Ability to create a "Masquerade as <role>" link that triggers change.

Created on 8 November 2023, about 1 year ago
Updated 9 April 2024, 9 months ago

Problem/Motivation

To trigger the change that this module provides, is to submit a form. This is an open request to provide a service that can generate a url that triggers the same functionality.

Storytime
My site has the functionality to provide a link to a user that allows them to masquerade as users. While this is managed via the Masquerade module, there is also functionality that provides a Dropbutton link to "View as [role]", that allows a user to preview the Group module implementation, that the current user is a manager of. Until this point, a function was ran to locate a user with role within the group, and then masquerade as that user.

The greatest limitation to this setup I describe, is that our users are created and blocked, until an onboarding process is completed. Since a user cannot masquerade as a blocked user, the link that provides the "View as [role]" in my site needs to change.

Reviewing the code, it seems that the only way to trigger the change in role is via the MasqueradeRoleForm form. It would be a great enhancement for the msqrole module to provide a service that generates a url that can also trigger the change process.

Proposed resolution

Add a service to generate a url that can be clicked to change the user role.

Remaining tasks

To be determined.

User interface changes

Likely none. This would be a service that is provided, but requires a developer to implement.

API changes

Adding the ability to generate a url.

Data model changes

Likely none

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States tregonia

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

Comments & Activities

Production build 0.71.5 2024