summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-11-03 09:41:00 +0800
committerGitHub <noreply@github.com>2023-11-03 01:41:00 +0000
commit1bf5527eac6b947010c8faf408f6747de2a2384f (patch)
treea78319354a20c1ca68d6ab78268ae9811a7f854c /cmd
parent80715ae5c7ca41a8ee2ad7b6459c587cc63195bf (diff)
downloadgitea-1bf5527eac6b947010c8faf408f6747de2a2384f.tar.gz
gitea-1bf5527eac6b947010c8faf408f6747de2a2384f.zip
Refactor Find Sources and fix bug when view a user who belongs to an unactive auth source (#27798)
The steps to reproduce it. First, create a new oauth2 source. Then, a user login with this oauth2 source. Disable the oauth2 source. Visit users -> settings -> security, 500 will be displayed. This is because this page only load active Oauth2 sources but not all Oauth2 sources.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/admin_auth.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/admin_auth.go b/cmd/admin_auth.go
index 3b308d77f7..014ddf329f 100644
--- a/cmd/admin_auth.go
+++ b/cmd/admin_auth.go
@@ -62,7 +62,7 @@ func runListAuth(c *cli.Context) error {
return err
}
- authSources, err := auth_model.Sources(ctx)
+ authSources, err := auth_model.FindSources(ctx, auth_model.FindSourcesOptions{})
if err != nil {
return err
}