gitea/models
Sybren aa45777c92
Allow custom "created" timestamps in user creation API (#22549)
Allow back-dating user creation via the `adminCreateUser` API operation.
`CreateUserOption` now has an optional field `created_at`, which can
contain a datetime-formatted string. If this field is present, the
user's `created_unix` database field will be updated to its value.

This is important for Blender's migration of users from Phabricator to
Gitea. There are many users, and the creation timestamp of their account
can give us some indication as to how long someone's been part of the
community.

The back-dating is done in a separate query that just updates the user's
`created_unix` field. This was the easiest and cleanest way I could
find, as in the initial `INSERT` query the field always is set to "now".
2023-02-16 10:32:01 -06:00
..
actions Fix ref to trigger Actions (#22679) 2023-01-31 22:45:25 +00:00
activities Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
admin Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
asymkey Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
auth Support scoped access tokens (#20908) 2023-01-17 15:46:03 -06:00
avatars Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
db Move delete user to service (#22478) 2023-02-13 13:11:41 +08:00
dbfs Add some comments for recent code (#22725) 2023-02-02 11:39:38 -06:00
fixtures Do not overwrite empty DefaultBranch (#22708) 2023-02-02 14:48:48 -06:00
git Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
issues fix incorrect role labels for migrated issues and comments (#22914) 2023-02-15 12:29:13 -05:00
migrations Fix migration issue. (#22867) 2023-02-11 21:28:41 +00:00
organization Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
packages Use link in UI which returned a relative url but not html_url which contains an absolute url (#21986) 2023-02-06 12:09:18 -06:00
perm Rename almost all Ctx functions (#22071) 2022-12-10 10:46:31 +08:00
project Preview images for Issue cards in Project Board view (#22112) 2023-02-11 16:12:41 +08:00
pull refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
repo Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
secret Secrets storage with SecretKey encrypted (#22142) 2022-12-20 17:07:13 +08:00
system Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
unit Repositories: by default disable all units except code and pulls on forks (#22541) 2023-02-04 14:48:38 +08:00
unittest Implement actions (#21937) 2023-01-31 09:45:19 +08:00
user Allow custom "created" timestamps in user creation API (#22549) 2023-02-16 10:32:01 -06:00
webhook Support system hook API (#14537) 2023-01-28 19:12:10 +01:00
error.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
fixture_generation.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
fixture_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
main_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
migrate.go Check primary keys for all tables and drop ForeignReference (#21721) 2022-12-23 19:35:43 +08:00
migrate_test.go Check primary keys for all tables and drop ForeignReference (#21721) 2022-12-23 19:35:43 +08:00
org.go refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
org_team.go Supports wildcard protected branch (#20825) 2023-01-16 16:00:22 +08:00
org_team_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
org_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
repo.go Implement actions (#21937) 2023-01-31 09:45:19 +08:00
repo_collaboration.go refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
repo_collaboration_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
repo_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
repo_transfer.go Always reuse transaction (#22362) 2023-01-08 09:34:58 +08:00
repo_transfer_test.go Rename almost all Ctx functions (#22071) 2022-12-10 10:46:31 +08:00