mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 13:20:19 +08:00
feat: fix the bug that admin cannot upload avatar for other users (#1323)
This commit is contained in:
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user