Unable to disable 2fa (while impersonating) #1207

Closed
opened 2025-02-15 18:56:24 +01:00 by tteichler · 3 comments
Owner
app_1        | AttributeError: 'User' object has no attribute 'is_verified'
app_1        | 2025-02-15 17:55:16,474 ERROR django.request[895]: Internal Server Error: /django/account/two_factor/disable/
app_1        | Traceback (most recent call last):
app_1        |   File "/usr/local/lib/python3.11/dist-packages/django/core/handlers/exception.py", line 55, in inner
app_1        |     response = get_response(request)
app_1        |                ^^^^^^^^^^^^^^^^^^^^^
app_1        |   File "/usr/local/lib/python3.11/dist-packages/django/core/handlers/base.py", line 197, in _get_response
app_1        |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
app_1        |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app_1        |   File "/usr/local/lib/python3.11/dist-packages/django/views/generic/base.py", line 104, in view
app_1        |     return self.dispatch(request, *args, **kwargs)
app_1        |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app_1        |   File "/usr/local/lib/python3.11/dist-packages/django/utils/decorators.py", line 48, in _wrapper
app_1        |     return bound_method(*args, **kwargs)
app_1        |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app_1        |   File "/usr/local/lib/python3.11/dist-packages/django/views/decorators/cache.py", line 80, in _view_wrapper
app_1        |     response = view_func(request, *args, **kwargs)
app_1        |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app_1        |   File "/usr/local/lib/python3.11/dist-packages/two_factor/views/profile.py", line 64, in dispatch
app_1        |     return fn(*args, **kwargs)
app_1        |            ^^^^^^^^^^^^^^^^^^^
app_1        |   File "/usr/local/lib/python3.11/dist-packages/django/contrib/auth/decorators.py", line 57, in _view_wrapper
app_1        |     test_pass = test_func(request.user)
app_1        |                 ^^^^^^^^^^^^^^^^^^^^^^^
app_1        |   File "/usr/local/lib/python3.11/dist-packages/django_otp/decorators.py", line 23, in test
app_1        |     return user.is_verified() or (
app_1        |            ^^^^^^^^^^^^^^^^
app_1        | AttributeError: 'User' object has no attribute 'is_verified'
``` app_1 | AttributeError: 'User' object has no attribute 'is_verified' app_1 | 2025-02-15 17:55:16,474 ERROR django.request[895]: Internal Server Error: /django/account/two_factor/disable/ app_1 | Traceback (most recent call last): app_1 | File "/usr/local/lib/python3.11/dist-packages/django/core/handlers/exception.py", line 55, in inner app_1 | response = get_response(request) app_1 | ^^^^^^^^^^^^^^^^^^^^^ app_1 | File "/usr/local/lib/python3.11/dist-packages/django/core/handlers/base.py", line 197, in _get_response app_1 | response = wrapped_callback(request, *callback_args, **callback_kwargs) app_1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ app_1 | File "/usr/local/lib/python3.11/dist-packages/django/views/generic/base.py", line 104, in view app_1 | return self.dispatch(request, *args, **kwargs) app_1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ app_1 | File "/usr/local/lib/python3.11/dist-packages/django/utils/decorators.py", line 48, in _wrapper app_1 | return bound_method(*args, **kwargs) app_1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ app_1 | File "/usr/local/lib/python3.11/dist-packages/django/views/decorators/cache.py", line 80, in _view_wrapper app_1 | response = view_func(request, *args, **kwargs) app_1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ app_1 | File "/usr/local/lib/python3.11/dist-packages/two_factor/views/profile.py", line 64, in dispatch app_1 | return fn(*args, **kwargs) app_1 | ^^^^^^^^^^^^^^^^^^^ app_1 | File "/usr/local/lib/python3.11/dist-packages/django/contrib/auth/decorators.py", line 57, in _view_wrapper app_1 | test_pass = test_func(request.user) app_1 | ^^^^^^^^^^^^^^^^^^^^^^^ app_1 | File "/usr/local/lib/python3.11/dist-packages/django_otp/decorators.py", line 23, in test app_1 | return user.is_verified() or ( app_1 | ^^^^^^^^^^^^^^^^ app_1 | AttributeError: 'User' object has no attribute 'is_verified' ```
Author
Owner

changed title from Unable to disable 2fa to Unable to disable 2fa{+ (while impersonating)+}

changed title from **Unable to disable 2fa** to **Unable to disable 2fa{+ (while impersonating)+}**
Author
Owner
https://github.com/django-otp/django-otp/issues/136 ?
Owner

Closed in favor of !3520

Closed in favor of !3520
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aleksis/AlekSIS-Core#1207
No description provided.