This repository has been archived on 2024-01-04. You can view files and clone it, but cannot push or open issues or pull requests.
forgejo/models/user
Sybren 326d29dce0
Reliable selection of admin user (#22509)
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.
2023-01-18 10:57:16 -06:00
..
avatar.go Fix get system setting bug when enabled redis cache (#22295) 2023-01-02 00:06:52 +08:00
badge.go
email_address.go Use ErrInvalidArgument in packages (#22268) 2022-12-31 12:49:37 +01:00
email_address_test.go
error.go
external_login_user.go
follow.go
follow_test.go
list.go
main_test.go
openid.go Use ErrInvalidArgument in packages (#22268) 2022-12-31 12:49:37 +01:00
openid_test.go
redirect.go
redirect_test.go
search.go
setting.go Fix get system setting bug when enabled redis cache (#22295) 2023-01-02 00:06:52 +08:00
setting_keys.go
setting_test.go
user.go Reliable selection of admin user (#22509) 2023-01-18 10:57:16 -06:00
user_test.go
user_update.go