ASTAKOS_HELPDESK_NOTIFICATION_EMAIL_SUBJECT '%s alpha2 testing account activated (%%(user)s)' % SITENAME Account activation helpdesk notification email subject
ASTAKOS_EMAIL_CHANGE_EMAIL_SUBJECT 'Email change on %s alpha2 testing' % SITENAME Email change subject
ASTAKOS_PASSWORD_RESET_EMAIL_SUBJECT 'Password reset on %s alpha2 testing' % SITENAME Password change email subject
-ASTAKOS_ENFORCE_TOKEN_RENEWAL True Enforce token renewal on password change/reset. If set to False, user can optionally decide
+ASTAKOS_NEWPASSWD_INVALIDATE_TOKEN True Enforce token renewal on password change/reset. If set to False, user can optionally decide
whether to renew the token or not.
=========================================== ============================================================================= ===========================================================================================
from astakos.im.settings import INVITATIONS_PER_LEVEL, DEFAULT_FROM_EMAIL, \
BASEURL, SITENAME, RECAPTCHA_PRIVATE_KEY, DEFAULT_CONTACT_EMAIL, \
RECAPTCHA_ENABLED, LOGGING_LEVEL, PASSWORD_RESET_EMAIL_SUBJECT, \
- ENFORCE_TOKEN_RENEWAL
+ NEWPASSWD_INVALIDATE_TOKEN
from astakos.im.widgets import DummyWidget, RecaptchaWidget
from astakos.im.functions import send_change_email
Extends PasswordChangeForm by enabling user
to optionally renew also the token.
"""
- if not ENFORCE_TOKEN_RENEWAL:
+ if not NEWPASSWD_INVALIDATE_TOKEN:
renew = forms.BooleanField(label='Renew token', required=False,
initial=True,
help_text='Unsetting this may result in security risk.')
def save(self, commit=True):
user = super(ExtendedPasswordChangeForm, self).save(commit=False)
- if ENFORCE_TOKEN_RENEWAL or self.cleaned_data.get('renew'):
+ if NEWPASSWD_INVALIDATE_TOKEN or self.cleaned_data.get('renew'):
user.renew_token()
if commit:
user.save()
Extends SetPasswordForm by enabling user
to optionally renew also the token.
"""
- if not ENFORCE_TOKEN_RENEWAL:
+ if not NEWPASSWD_INVALIDATE_TOKEN:
renew = forms.BooleanField(label='Renew token', required=False,
initial=True,
help_text='Unsetting this may result in security risk.')
def save(self, commit=True):
user = super(ExtendedSetPasswordForm, self).save(commit=False)
- if ENFORCE_TOKEN_RENEWAL or self.cleaned_data.get('renew'):
+ if NEWPASSWD_INVALIDATE_TOKEN or self.cleaned_data.get('renew'):
try:
user = AstakosUser.objects.get(id=user.id)
except AstakosUser.DoesNotExist:
'Password reset on %s alpha2 testing' % SITENAME)
# Enforce token renewal on password change/reset
-ENFORCE_TOKEN_RENEWAL = getattr(settings, 'ASTAKOS_ENFORCE_TOKEN_RENEWAL', True)
\ No newline at end of file
+NEWPASSWD_INVALIDATE_TOKEN = getattr(settings, 'ASTAKOS_NEWPASSWD_INVALIDATE_TOKEN', True)
\ No newline at end of file