Implement ghost comment mitigation #9

Closed
momar wants to merge 10 commits from Codeberg/Discussion#24 into codeberg-test
Image
Member

Adds a config option USER_DELETE_WITH_COMMENTS_MAX_DAYS to the [service] section.

Adds a config option USER_DELETE_WITH_COMMENTS_MAX_DAYS to the [service] section.
Adds a config option USER_DELETE_WITH_COMMENTS_MAX_DAYS to the [service] section. See Codeberg/Discussion#24 for the underlying issue.
@ -1132,6 +1132,17 @@ func deleteUser(e *xorm.Session, u *User) error {
return fmt.Errorf("deleteBeans: %v", err)
}
if section, err := setting.Cfg.GetSection("service"); err == nil {
Member

this should go into modules/setting/service.go as for example
AUTO_WATCH_ON_CHANGES

this should go into modules/setting/service.go as for example `AUTO_WATCH_ON_CHANGES`
Member

Thank you for having a look! Is there interest to merge this upstream, too?

Thank you for having a look! Is there interest to merge this upstream, too?
Image
Owner

This PR broke when I force pushed to codeberg-test, thats not good - sorry, I rebased the latest commits from upstream

This PR broke when I force pushed to codeberg-test, thats not good - sorry, I rebased the latest commits from upstream
Image
Owner

Is this expected to happen?

Is this expected to happen?
Image
Member

I think this should be added upstream first ... but it can be cherry picked fom codeberg too, if merged the right way ...

I think this should be added upstream first ... but it can be cherry picked fom codeberg too, if merged the right way ...
Image
Owner

Even cooler if this will be upstream.
Anyone know a trick how to fix this PR (the damage I did with force pushing)

Even cooler if this will be upstream. Anyone know a trick how to fix this PR (the damage I did with force pushing)
Image
Author
Member

I can look at this tomorrow

I can look at this tomorrow
Image
Member

I'll try to cerry-pick and get it in upstream

I'll try to cerry-pick and get it in upstream
Image
Member

https://github.com/go-gitea/gitea/pull/14349

EDIT: STATE: finished it ... waiting for reviews ...

https://github.com/go-gitea/gitea/pull/14349 EDIT: STATE: finished it ... waiting for reviews ...
Image
Member

@hw @ashimokawa can be cherry pick

@hw @ashimokawa can be cherry pick
Image
Owner

@6543

Cherry-picked and deployed on codeberg-test, set to 7 days, ready for testing!

@6543 Cherry-picked and deployed on codeberg-test, set to 7 days, ready for testing!
Image
Owner

@6543

Seems to work!
The "cleanup" commit which removes the German translation is because that should be done with the official way of translating?

I could remove that commit to make german work again.

@6543 Seems to work! The "cleanup" commit which removes the German translation is because that should be done with the official way of translating? I could remove that commit to make german work again.
Image
Member
@ashimokawa yes you could add a reverted https://github.com/go-gitea/gitea/pull/14349/commits/9d767ff6ef9f668bfd22276c9b20dbbd335ff6d7 for codeberg ...
Image
Owner

Closing this in favor of #11

Closing this in favor of #11
Image ashimokawa closed this pull request 2021-01-20 11:41:26 +01:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Codeberg-Infrastructure/forgejo!9
No description provided.