-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix forgot removed records when deleting user #5429
Conversation
@lunny looks like xorm update has broken our unit tests.. |
@lafriks yes, will fix that. |
f2be1a4
to
85951fc
Compare
Codecov Report
@@ Coverage Diff @@
## master #5429 +/- ##
=========================================
Coverage ? 37.62%
=========================================
Files ? 320
Lines ? 46974
Branches ? 0
=========================================
Hits ? 17673
Misses ? 26791
Partials ? 2510
Continue to review full report at Codecov.
|
@lafriks fixed. |
Conflicts. |
91bba2d
to
18bdf78
Compare
return fmt.Errorf("deletePublicKeys: %v", err) | ||
} | ||
rewriteAllPublicKeys(e) | ||
// ***** END: PublicKey ***** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RewriteAllPublicKeys is called at the end of DeleteUser too, does it still need to be called there?
models/user.go
Outdated
@@ -1087,6 +1088,7 @@ func DeleteUser(u *User) (err error) { | |||
if err = sess.Commit(); err != nil { | |||
return err | |||
} | |||
sess.Close() | |||
|
|||
return RewriteAllPublicKeys() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above
18bdf78
to
8c20637
Compare
@zeripath Good catch. Done. |
@lunny Does this need backporting? |
Will fix #5356 and replace #5357 , also update xorm to latest stable version.