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

[BUG] "Operate as user" #2766

Closed
rasmussenikt opened this issue Nov 26, 2023 · 2 comments · Fixed by #2777
Closed

[BUG] "Operate as user" #2766

rasmussenikt opened this issue Nov 26, 2023 · 2 comments · Fixed by #2777
Assignees
Labels

Comments

@rasmussenikt
Copy link

Describe the bug
Trying to edit the default dashboard on the default user.
But when trying to "operate as user" you get an error page.

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'Tools --> User and API Administrations --> Default user'
  2. Click on 'Operate as user'
  3. See error

Expected behavior

To be able to operate as another user and edit the default dashboard.

Screenshots

image

Tracebacks

Traceback (most recent call last):
  File "/opt/venvs/nav/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/opt/venvs/nav/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/venvs/nav/lib/python3.9/site-packages/django/views/decorators/debug.py", line 89, in sensitive_post_parameters_wrapper
    return view(request, *args, **kwargs)
  File "/opt/venvs/nav/lib/python3.9/site-packages/nav/web/useradmin/views.py", line 83, in account_detail
    return sudo_to_user(request)
  File "/opt/venvs/nav/lib/python3.9/site-packages/nav/web/useradmin/views.py", line 221, in sudo_to_user
    sudo(request, sudo_account)
TypeError: 'module' object is not callable

Environment (please complete the following information):

  • Ubuntu 22.04.3, Vivaldi 6.4.3160.44 (Stable channel) stable (64-bit) Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36
  • OS on the NAV server [Debian 11]
  • NAV version installed [5.8.0]
  • Method of installation [Debian package]

Additional context

@lunkwill42
Copy link
Member

Definitely reproducible, thanks for the bug report!

@johannaengland
Copy link
Contributor

Thank you for the detailed bug report, this is now fixed by #2777.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants