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

fix-windows-multiarch-build
Anthony Lapenna 5 years ago committed by GitHub
parent ad5f51964c
commit e0d83db609
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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
}

Loading…
Cancel
Save