Skip to content

Commit

Permalink
api.admin: set is_verified=1 for the first superuser
Browse files Browse the repository at this point in the history
Bypass the email verification step when creating the first superuser
as this is a special case.  Administrators should be able to create
this entry entirely non-interactively, and they should also have
direct access to the database anyway where this flag could be set by
hand.

Signed-off-by: Guillaume Tucker <[email protected]>
  • Loading branch information
gctucker authored and JenySadadia committed Nov 15, 2023
1 parent a1e7981 commit 6f821ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ async def setup_admin_user(db, username, email, admin_group):
hashed_password=hashed_password,
email=email,
groups=[admin_group],
is_superuser=1
is_superuser=1,
is_verified=1,
))


Expand Down

0 comments on commit 6f821ec

Please sign in to comment.