goauthentik / authentik

The authentication glue you need.
https://goauthentik.io
Other
13.53k stars 905 forks source link

ak createsuperuser broken #6667

Closed poelzi closed 1 year ago

poelzi commented 1 year ago

Describe the bug run "ak createsuperuser" broken:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/manage.py", line 31, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 440, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 402, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.11/site-packages/django/contrib/auth/management/commands/createsuperuser.py", line 88, in execute
    return super().execute(*args, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 448, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/contrib/auth/management/commands/createsuperuser.py", line 233, in handle
    self.UserModel._default_manager.db_manager(database).create_superuser(
  File "/usr/local/lib/python3.11/site-packages/django/contrib/auth/models.py", line 172, in create_superuser
    return self._create_user(username, email, password, **extra_fields)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/contrib/auth/models.py", line 153, in _create_user
    user = self.model(username=username, email=email, **extra_fields)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/db/models/base.py", line 554, in __init__
    _setattr(self, prop, value)
AttributeError: property 'is_staff' of 'User' object has no setter

To Reproduce Steps to reproduce the behavior:

  1. run 'ak createsuperuser'

Version and Deployment (please complete the following information):

BeryJu commented 1 year ago

Use either the initial setup flow (https://goauthentik.io/docs/installation/docker-compose#startup), the automated install (https://goauthentik.io/docs/installation/automated-install) or via recovery https://goauthentik.io/docs/troubleshooting/login

The createsuperuser is not intended to be used