feat: fix the bug that admin cannot upload avatar for other users (#1323)

This commit is contained in:
Yaodong Yu
2022-11-25 09:36:47 +08:00
committed by GitHub
parent ba9d1e2388
commit b337b908ea
12 changed files with 23 additions and 25 deletions

View File

@ -222,7 +222,7 @@ func initBuiltInLdap() {
}
func initBuiltInProvider() {
provider := GetProvider(util.GetId("provider_captcha_default"))
provider := GetProvider(util.GetId("admin", "provider_captcha_default"))
if provider != nil {
return
}

View File

@ -168,7 +168,7 @@ func initDefinedLdap(ldap *Ldap) {
}
func initDefinedProvider(provider *Provider) {
existed := GetProvider(util.GetId(provider.Name))
existed := GetProvider(util.GetId("admin", provider.Name))
if existed != nil {
return
}

View File

@ -678,7 +678,7 @@ func GetWechatMiniProgramToken(application *Application, code string, host strin
ErrorDescription: "the application does not support wechat mini program",
}
}
provider := GetProvider(util.GetId(mpProvider.Name))
provider := GetProvider(util.GetId("admin", mpProvider.Name))
mpIdp := idp.NewWeChatMiniProgramIdProvider(provider.ClientId, provider.ClientSecret)
session, err := mpIdp.GetSessionByCode(code)
if err != nil {