Skip to content

Commit

Permalink
undo last commit: turns out hiding usable_password didn't make much s…
Browse files Browse the repository at this point in the history
…ense
  • Loading branch information
pinwheeeel committed Oct 3, 2024
1 parent d8a3283 commit 6f9b306
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
10 changes: 0 additions & 10 deletions core/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,16 +628,6 @@ class UserAdmin(DjangoUserAdmin):
form = UserAdminForm
add_form = UserCreationForm

add_fieldsets = (
(
None,
{
"classes": ("wide",),
"fields": ("username", "password1", "password2"), # Removed usable_password field
},
),
)

def get_inline_instances(self, request, obj=None):
if obj and StaffMember.objects.filter(user=obj).exists():
# Add StaffMemberInline if the user has a related StaffMember
Expand Down
4 changes: 2 additions & 2 deletions core/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from django import forms
from django.conf import settings
from django.contrib.auth.forms import UserChangeForm as ContribUserChangeForm
from django.contrib.auth.forms import UserCreationForm as ContribUserCreationForm
from django.contrib.auth.forms import AdminUserCreationForm as ContribAdminUserCreationForm
from django.utils import timezone
from django_select2 import forms as s2forms
from martor.widgets import AdminMartorWidget
Expand Down Expand Up @@ -290,5 +290,5 @@ class UserAdminForm(CaseInsensitiveUsernameMixin, ContribUserChangeForm):
expo_notif_tokens = forms.JSONField(required=False)


class UserCreationForm(CaseInsensitiveUsernameMixin, ContribUserCreationForm):
class UserCreationForm(CaseInsensitiveUsernameMixin, ContribAdminUserCreationForm):
pass

0 comments on commit 6f9b306

Please sign in to comment.