Save initial signup information for users to aid in spam prevention (#31852)
This will allow instance admins to view signup pattern patterns for public instances. It is modelled after discourse, mastodon, and MediaWiki's approaches. Note: This has privacy implications, but as the above-stated open-source projects take this approach, especially MediaWiki, which I have no doubt looked into this thoroughly, it is likely okay for us, too. However, I would be appreciative of any feedback on how this could be improved. --------- Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
parent
a323a82ec4
commit
f183783baa
18 changed files with 61 additions and 23 deletions
|
@ -92,7 +92,7 @@ func TestCreateUser(t *testing.T) {
|
|||
MustChangePassword: false,
|
||||
}
|
||||
|
||||
assert.NoError(t, user_model.CreateUser(db.DefaultContext, user))
|
||||
assert.NoError(t, user_model.CreateUser(db.DefaultContext, user, &user_model.Meta{}))
|
||||
|
||||
assert.NoError(t, DeleteUser(db.DefaultContext, user, false))
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ func TestCreateUser_Issue5882(t *testing.T) {
|
|||
for _, v := range tt {
|
||||
setting.Admin.DisableRegularOrgCreation = v.disableOrgCreation
|
||||
|
||||
assert.NoError(t, user_model.CreateUser(db.DefaultContext, v.user))
|
||||
assert.NoError(t, user_model.CreateUser(db.DefaultContext, v.user, &user_model.Meta{}))
|
||||
|
||||
u, err := user_model.GetUserByEmail(db.DefaultContext, v.user.Email)
|
||||
assert.NoError(t, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue