Create a superuser in the prepare-dev script.
Review Request #11163 — Created Sept. 8, 2020 and submitted
With Review Board 3.0 and earlier, we relied on a
syncdb
call to
automatically trigger thecreatesuperuser
management command. Django
stopped triggering this behavior in 1.7, meaning that any new trees set
up failed to have a superuser by default.This adds in superuser creation directly in the script. We handle it all
ourselves, utilizing superuser creation capabilities from rb-site. We
ask for the user information and then create the user.If there's already a superuser (caused by running the script with an
existing database set up), the user will be given a list of the
superuser accounts and will then be told how to create a new one if they
want it. The script won't attempt to create for them.
Ran
prepare-dev.py
on a brand-new clone. Saw the superuser prompt,
with a default username based on my logged-in user. Provided the information
and saw that the account was created.Ran it with an existing database. Saw the list of superusers and the
instructions on callingcreatesuperuser
.
Summary | ID |
---|---|
34699c447923f46ba9241eedf590abe89d8b3ef3 |