Closed sbryzak closed 5 years ago
Thank you @sbryzak for this contribution!
It seems that this PR already contains some added or changed tests. Good job!
Your plugin configuration is stored in the file.
Still need to add some tests for this.
:exclamation: No coverage uploaded for pull request base (
master@6425258
). Click here to learn what that means. The diff coverage is36.36%
.
@@ Coverage Diff @@
## master #829 +/- ##
=========================================
Coverage ? 78.24%
=========================================
Files ? 98
Lines ? 9205
Branches ? 0
=========================================
Hits ? 7202
Misses ? 1470
Partials ? 533
Impacted Files | Coverage Δ | |
---|---|---|
...ication/account/worker/user_deactivation_worker.go | 46.34% <0%> (ø) |
|
migration/migration.go | 67.05% <100%> (ø) |
|
configuration/configuration.go | 82.42% <33.33%> (ø) |
|
authentication/account/service/user.go | 75% <33.33%> (ø) |
|
authentication/account/repository/identity.go | 76.49% <53.84%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 6425258...d917002. Read the comment docs.
Tests added for BumpDeactivationSchedule()
, plus ListIdentitiesToActivate()
filtering and sorting.
Fixes #828
This PR adds a
deactivation_scheduled
timestamp column to the identity table. This timestamp is updated by the notification worker when a user is notified for deactivation. When a user logs in and theTouchLastActive()
function is called on that user, thedeactivation_scheduled
timestamp is cleared.When the deactivation worker iterates through the identities returned by
UserService.ListIdentitiesToDeactivate()
it calls theBumpDeactivationSchedule()
function to update thedeactivation_scheduled
column for each identity, increasing it by a configured amount to prevent rapid churning of failed deactivation attempts. TheListIdentitiesToDeactivate()
function adds a condition (and sort) criteria fordeactivation_scheduled
, meaning that it will only return identities for which the scheduled deactivation time has been reached.