diff --git a/babybuddy/forms.py b/babybuddy/forms.py index 9c91cb5b..c33c2b0a 100644 --- a/babybuddy/forms.py +++ b/babybuddy/forms.py @@ -20,6 +20,7 @@ class UserAddForm(UserCreationForm): def save(self, commit=True): user = super(UserAddForm, self).save(commit=False) + # All Baby Buddy users are superusers. user.is_superuser = True if commit: user.save() diff --git a/babybuddy/management/commands/createuser.py b/babybuddy/management/commands/createuser.py index a14ec161..8d8bb1fd 100644 --- a/babybuddy/management/commands/createuser.py +++ b/babybuddy/management/commands/createuser.py @@ -113,6 +113,8 @@ class Command(BaseCommand): ).create_user(**user_data, password=user_password) user.email = options.get("email") user.is_staff = options.get("is_staff") + # All Baby Buddy users are superusers. + user.is_superuser = True user.save() if options.get("verbosity") > 0: