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

Merged
merged 4 commits into from Dec 18, 2018

Conversation

7 participants
@lunny
Copy link
Member

lunny commented Nov 29, 2018

Will fix #5356 and replace #5357 , also update xorm to latest stable version.

@lunny lunny added the kind/bug label Nov 29, 2018

@bkcsoft bkcsoft added the lgtm/need 1 label Nov 29, 2018

@lafriks lafriks added this to the 1.7.0 milestone Nov 29, 2018

@lafriks

This comment has been minimized.

Copy link
Member

lafriks commented Nov 29, 2018

@lunny looks like xorm update has broken our unit tests..

@lunny

This comment has been minimized.

Copy link
Member

lunny commented Nov 30, 2018

@lafriks yes, will fix that.

@lunny lunny force-pushed the lunny:lunny/fix_delete_user branch from f2be1a4 to 85951fc Dec 9, 2018

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Dec 9, 2018

Codecov Report

❗️ No coverage uploaded for pull request base (master@0bd802e). Click here to learn what that means.
The diff coverage is 29.03%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #5429   +/-   ##
=========================================
  Coverage          ?   37.62%           
=========================================
  Files             ?      320           
  Lines             ?    46974           
  Branches          ?        0           
=========================================
  Hits              ?    17673           
  Misses            ?    26791           
  Partials          ?     2510
Impacted Files Coverage Δ
models/migrations/migrations.go 2.61% <ø> (ø)
models/migrations/v75.go 0% <0%> (ø)
models/user.go 45.93% <60%> (ø)
models/ssh_key.go 39.04% <75%> (ø)

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 0bd802e...18bdf78. Read the comment docs.

@lunny

This comment has been minimized.

Copy link
Member

lunny commented Dec 9, 2018

@lafriks fixed.

@kolaente

This comment has been minimized.

Copy link
Member

kolaente commented Dec 11, 2018

Conflicts.

@lunny lunny force-pushed the lunny:lunny/fix_delete_user branch 2 times, most recently from 91bba2d to 18bdf78 Dec 12, 2018

return fmt.Errorf("deletePublicKeys: %v", err)
}
rewriteAllPublicKeys(e)
// ***** END: PublicKey *****

This comment has been minimized.

@zeripath

zeripath Dec 17, 2018

Contributor

RewriteAllPublicKeys is called at the end of DeleteUser too, does it still need to be called there?

@@ -1087,6 +1088,7 @@ func DeleteUser(u *User) (err error) {
if err = sess.Commit(); err != nil {
return err
}
sess.Close()

return RewriteAllPublicKeys()

This comment has been minimized.

@zeripath

zeripath Dec 17, 2018

Contributor

See above

lunny added some commits Nov 29, 2018

@lunny lunny force-pushed the lunny:lunny/fix_delete_user branch from 18bdf78 to 8c20637 Dec 18, 2018

@lunny

This comment has been minimized.

Copy link
Member

lunny commented Dec 18, 2018

@zeripath Good catch. Done.

@bkcsoft bkcsoft added lgtm/done and removed lgtm/need 1 labels Dec 18, 2018

@techknowlogick techknowlogick merged commit fe55ab2 into go-gitea:master Dec 18, 2018

2 checks passed

approvals/lgtm this commit looks good
continuous-integration/drone/pr the build was successful
Details
@zeripath

This comment has been minimized.

Copy link
Contributor

zeripath commented Dec 18, 2018

@lunny Does this need backporting?

@lunny

This comment has been minimized.

Copy link
Member

lunny commented Dec 19, 2018

@zeripath #5509 is the backport of this one.

@lunny lunny deleted the lunny:lunny/fix_delete_user branch Dec 19, 2018

@lunny lunny referenced this pull request Dec 19, 2018

Merged

fix table name typo on SQL #5562

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment