mirror of
https://github.com/Mistake35/Cedar-Django.git
synced 2026-07-18 00:21:14 +10:00
Cedar now uses Django's Perms and groups.
You'll have to do some manual editing to give yourself superuser. - /admin/ now uses perms and groups. So you can fine tune who has access to what model. - Moved the metadata button to the user sidebar - Removed metaview lists from showing in user settings and in the metadata page.
This commit is contained in:
@@ -125,7 +125,7 @@ class LoginForm(forms.Form):
|
||||
raise forms.ValidationError("Invalid password.", code='invalid')
|
||||
elif user[1] == 2:
|
||||
raise forms.ValidationError("This account's password needs to be reset. Contact an admin or reset by email.", code='required_reset')
|
||||
elif not user[0].is_active():
|
||||
elif not user[0].is_active:
|
||||
raise forms.ValidationError("This account was disabled.", code='disabled')
|
||||
return cleaned_data
|
||||
|
||||
@@ -136,7 +136,7 @@ class User_tools_Form(forms.ModelForm):
|
||||
|
||||
class Meta:
|
||||
model = User
|
||||
fields = ['username', 'nickname', 'role', 'c_tokens', 'hide_online', 'active', 'can_invite', 'has_mh', 'avatar']
|
||||
fields = ['username', 'nickname', 'role', 'c_tokens', 'hide_online', 'can_invite', 'has_mh', 'avatar']
|
||||
|
||||
def clean_username(self):
|
||||
username = self.cleaned_data.get('username')
|
||||
|
||||
Reference in New Issue
Block a user