mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-19 17:26:58 +01:00
326d29dce0
When importing a repository via `gitea restore-repo`, external users will get remapped to an admin user. This admin user is obtained via `users.GetAdminUser()`, which unfortunately picks a more-or-less random admin to return. This makes it hard to predict which admin user will get assigned. This patch orders the admin by ascending ID before choosing the first one, i.e. it picks the admin with the lowest ID. Even though it would be nicer to have full control over which user is chosen, this at least gives us a predictable result. |
||
---|---|---|
.. | ||
activities | ||
admin | ||
asymkey | ||
auth | ||
avatars | ||
db | ||
fixtures | ||
git | ||
issues | ||
migrations | ||
organization | ||
packages | ||
perm | ||
project | ||
pull | ||
repo | ||
secret | ||
system | ||
unit | ||
unittest | ||
user | ||
webhook | ||
error.go | ||
fixture_generation.go | ||
fixture_test.go | ||
main_test.go | ||
migrate_test.go | ||
migrate.go | ||
org_team_test.go | ||
org_team.go | ||
org_test.go | ||
org.go | ||
repo_collaboration_test.go | ||
repo_collaboration.go | ||
repo_test.go | ||
repo_transfer_test.go | ||
repo_transfer.go | ||
repo.go | ||
user.go |