Skip to content

[BUG] The default dashboard can no longer be modified by an admin #3571

@lunkwill42

Description

@lunkwill42

Describe the bug

It used to be possible for a NAV administrator to operate as the anonymous user (just as any other user) by selecting the default account from the * User and API Administration * tool and clicking the "Operate as this user" button.

This currently the only way to modify the default dashboard, the dashboard that is shown to all anonymous users, and which also serves as the template dashboard for all new user accounts.

Currently, clicking the "Operate as this user" button on the default account causes the administrator to be logged out of the system entirely, resulting in the inability to edit the default dashboard.

To Reproduce

Steps to reproduce the behavior:

  1. Log in to NAV as an administrator
  2. Click on Toolbox → User and API Administration
  3. Click on the default account in the account list
  4. Click on the Operate as this user button on the account page
  5. Observe that the user has now been logged out.

Expected behavior

When clicking Operate as this user on the default account, the user session should enter "sudo mode": The user should be taken to the NAV front page, and the sudo banner should be displayed on top of every page (this screenshot shows the banner for a test user, not the default user):

Image

Environment (please complete the following information):

  • NAV version installed: 5.14.1

Additional context

It is unclear at this point which version of NAV broke this functionality, but I suspect it might be one of the recent changes to move towards using Django's authentication/authorization system.

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions