mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 19:40:19 +08:00
feat: fix the bug that admin cannot upload avatar for other users (#1323)
This commit is contained in:
@ -126,7 +126,7 @@ func getInitScore() (int, error) {
|
||||
func (c *ApiController) GetProviderFromContext(category string) (*object.Provider, *object.User, bool) {
|
||||
providerName := c.Input().Get("provider")
|
||||
if providerName != "" {
|
||||
provider := object.GetProvider(util.GetId(providerName))
|
||||
provider := object.GetProvider(util.GetId("admin", providerName))
|
||||
if provider == nil {
|
||||
c.ResponseError(c.T("ProviderErr.ProviderNotFound"), providerName)
|
||||
return nil, nil, false
|
||||
|
Reference in New Issue
Block a user