diff --git a/preferences/migrations/0061_optionaluser_allow_archived_connexion.py b/preferences/migrations/0061_optionaluser_allow_archived_connexion.py new file mode 100644 index 00000000..505f940b --- /dev/null +++ b/preferences/migrations/0061_optionaluser_allow_archived_connexion.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.23 on 2019-09-09 09:50 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('preferences', '0060_auto_20190712_1821'), + ] + + operations = [ + migrations.AddField( + model_name='optionaluser', + name='allow_archived_connexion', + field=models.BooleanField(default=False, help_text='If True, archived users are allowed to connect.'), + ), + ] diff --git a/preferences/models.py b/preferences/models.py index be8b8ec2..98374e77 100644 --- a/preferences/models.py +++ b/preferences/models.py @@ -123,6 +123,10 @@ class OptionalUser(AclMixin, PreferencesModel): help_text=_("If True, all new created and connected users are active." " If False, only when a valid registration has been paid.") ) + allow_archived_connexion = models.BooleanField( + default=False, + help_text=_("If True, archived users are allowed to connect.") + ) class Meta: permissions = ( diff --git a/preferences/templates/preferences/display_preferences.html b/preferences/templates/preferences/display_preferences.html index 3e71c817..626cb1a3 100644 --- a/preferences/templates/preferences/display_preferences.html +++ b/preferences/templates/preferences/display_preferences.html @@ -125,6 +125,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,