aboutsummaryrefslogtreecommitdiffstats
path: root/routers/init.go
diff options
context:
space:
mode:
authorrenothing <261274+renothing@users.noreply.github.com>2019-07-27 21:15:30 +0800
committerLauris BH <lauris@nix.lv>2019-07-27 16:15:30 +0300
commitcbf231a67595feb36fccb68dc00b2bc7607fa882 (patch)
tree9f200fb9c89dc79a2f6a6472901668753a742aa3 /routers/init.go
parent700cd346fad3a0bed203bfb032f7b4bc9d1f2551 (diff)
downloadgitea-cbf231a67595feb36fccb68dc00b2bc7607fa882.tar.gz
gitea-cbf231a67595feb36fccb68dc00b2bc7607fa882.zip
fix wrong email when use gitea as OAuth2 provider (#7640)
when you use gitea as OAuth2 provider, the /api/v1/user should return user primary email as identifier, which is unique in OAuth2 clients. this patch use convert.ToUser replace all u.APIFormat in api requests, return primary email when caller is yourself or admin.
Diffstat (limited to 'routers/init.go')
0 files changed, 0 insertions, 0 deletions