fix(authentication/ldap): fix an issue with authorizations not updated after ldap login (#3577)

This commit is contained in:
Anthony Lapenna
2020-02-25 18:54:32 +13:00
committed by GitHub
parent ad5f51964c
commit e0d83db609

View File

@@ -79,6 +79,11 @@ func (handler *Handler) authenticateLDAP(w http.ResponseWriter, user *portainer.
log.Printf("Warning: unable to automatically add user into teams: %s\n", err.Error())
}
err = handler.AuthorizationService.UpdateUsersAuthorizations()
if err != nil {
return &httperror.HandlerError{http.StatusInternalServerError, "Unable to update user authorizations", err}
}
return handler.writeToken(w, user)
}
@@ -175,6 +180,7 @@ func (handler *Handler) addUserIntoTeams(user *portainer.User, settings *portain
}
}
}
return nil
}