Skip to content

Commit

Permalink
[feature] Added password expiration settings and celery task #449
Browse files Browse the repository at this point in the history
Closes #449
  • Loading branch information
pandafy committed Oct 30, 2023
1 parent a4a323c commit 8c4081c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions templates/openwisp2/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@

AUTHENTICATION_BACKENDS = [
'openwisp_users.backends.UsersAuthenticationBackend',
'openwisp_users.backends.UsersAllowExpiredPassBackend',
]

{% if openwisp2_radius %}
Expand Down Expand Up @@ -235,6 +236,10 @@
}

CELERY_BEAT_SCHEDULE = {
'password_expiry_email': {
'task': 'openwisp_users.tasks.password_expiration_email',
'schedule': crontab(hour=1, minute=0),
},
'delete_old_notifications': {
'task': 'openwisp_notifications.tasks.delete_old_notifications',
'schedule': crontab(**{ {{ cron_delete_old_notifications }} }),
Expand Down Expand Up @@ -363,6 +368,7 @@
{'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator'},
{'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator'},
{'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator'},
{'NAME': 'openwisp_users.password_validation.PasswordReuseValidator'}
]

# Internationalization
Expand Down

0 comments on commit 8c4081c

Please sign in to comment.