Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override roles for admin user #1800

Open
dbauszus-glx opened this issue Jan 7, 2025 · 0 comments · Fixed by #1801
Open

Override roles for admin user #1800

dbauszus-glx opened this issue Jan 7, 2025 · 0 comments · Fixed by #1801
Assignees
Labels
Feature New feature requests or changes to the behaviour or look of existing application features. Testing Changes relating to existing or new unit tests.

Comments

@dbauszus-glx
Copy link
Member

An admin user may want to check a request with different roles.

The roles parameter could be assigned as the user roles for admin user.

In the auth module before the user is returned.

if (user?.admin === true && req.params.roles) {
  user.roles = req.params.roles.split(',')
}
@dbauszus-glx dbauszus-glx added Feature New feature requests or changes to the behaviour or look of existing application features. Testing Changes relating to existing or new unit tests. labels Jan 7, 2025
@dbauszus-glx dbauszus-glx self-assigned this Jan 7, 2025
@dbauszus-glx dbauszus-glx linked a pull request Jan 7, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature requests or changes to the behaviour or look of existing application features. Testing Changes relating to existing or new unit tests.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant