[feature] Supported password expiration feature of openwisp-users #491#494
[feature] Supported password expiration feature of openwisp-users #491#494nemesifier merged 6 commits intomasterfrom
Conversation
docs/source/user/settings.rst
Outdated
| ``OPENWISP_RADIUS_DELETE_INACTIVE_USERS`` | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| **Default**: ``540`` (18 months) |
There was a problem hiding this comment.
The default here looks incorrect to me.
There was a problem hiding this comment.
Are you referencing the default value? If so, the issue asked for the default value of 18 months.
There was a problem hiding this comment.
The values in the README and code do not match, let's set this to disabled by default in both.
openwisp_radius/tasks.py
Outdated
| is_staff=False, | ||
| last_login__lt=timezone.now() | ||
| - timedelta(days=app_settings.DELETE_INACTIVE_USERS), | ||
| ).delete() |
There was a problem hiding this comment.
Please move this logic to a model method and just call the model method here.
Let's stop putting logic in celery tasks, let's consider these tasks as some sort of views.
There was a problem hiding this comment.
These are the models which are defined in openwisp-radius:
RadiusCheck
RadiusReply
RadiusAccounting
RadiusGroup
RadiusGroupCheck
RadiusGroupReply
RadiusUserGroup
RadiusPostAuth
Nas
RadiusBatch
RadiusToken
OrganizationRadiusSettings
PhoneToken
RegisteredUser
RegisteredUser seems to be closest with the operation
docs/source/user/settings.rst
Outdated
| ``OPENWISP_RADIUS_DELETE_INACTIVE_USERS`` | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| **Default**: ``540`` (18 months) |
376c8e9 to
17da885
Compare
nemesifier
left a comment
There was a problem hiding this comment.
Waiting for openwisp/openwisp-users#363 to be merged before merging.
Closes #491
Blockers