diff --git a/api/http/handler/auth/authenticate.go b/api/http/handler/auth/authenticate.go index 56441c33a..8e51f65db 100644 --- a/api/http/handler/auth/authenticate.go +++ b/api/http/handler/auth/authenticate.go @@ -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 }