diff --git a/passbook/core/migrations/0002_auto_20191010_1058.py b/passbook/core/migrations/0002_auto_20191010_1058.py new file mode 100644 index 000000000..76cd446ba --- /dev/null +++ b/passbook/core/migrations/0002_auto_20191010_1058.py @@ -0,0 +1,17 @@ +# Generated by Django 2.2.6 on 2019-10-10 10:58 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('passbook_core', '0001_initial'), + ] + + operations = [ + migrations.AlterModelOptions( + name='user', + options={'permissions': (('reset_user_password', 'Reset Password'),)}, + ), + ] diff --git a/passbook/core/models.py b/passbook/core/models.py index 301e1d878..95da3a3f8 100644 --- a/passbook/core/models.py +++ b/passbook/core/models.py @@ -58,6 +58,12 @@ class User(GuardianUserMixin, AbstractUser): self.password_change_date = now() return super().set_password(password) + class Meta: + + permissions = ( + ('reset_user_password', 'Reset Password'), + ) + class Provider(models.Model): """Application-independent Provider instance. For example SAML2 Remote, OAuth2 Application"""