mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
fix(kubernetes): kube env permissions when down [EE-5427] (#10327)
This commit is contained in:
parent
cc37ccfe4d
commit
14853f6da0
18 changed files with 282 additions and 103 deletions
|
@ -7,7 +7,6 @@ import (
|
|||
|
||||
portainer "github.com/portainer/portainer/api"
|
||||
"github.com/portainer/portainer/api/dataservices"
|
||||
"github.com/portainer/portainer/api/http/utils"
|
||||
"github.com/portainer/portainer/api/internal/tag"
|
||||
httperror "github.com/portainer/portainer/pkg/libhttp/error"
|
||||
"github.com/portainer/portainer/pkg/libhttp/request"
|
||||
|
@ -156,9 +155,12 @@ func (handler *Handler) updateEndpointGroup(tx dataservices.DataStoreTx, endpoin
|
|||
err = handler.AuthorizationService.CleanNAPWithOverridePolicies(tx, &endpoint, endpointGroup)
|
||||
if err != nil {
|
||||
// Update flag with endpoint and continue
|
||||
endpoint.PendingActions = utils.GetUpdatedEndpointPendingActions(&endpoint, "CleanNAPWithOverridePolicies", endpointGroup.ID)
|
||||
err = tx.Endpoint().UpdateEndpoint(endpoint.ID, &endpoint)
|
||||
log.Warn().Err(err).Msgf("Unable to update user authorizations for endpoint (%d) and endpopint group (%d)", endpoint.ID, endpointGroup.ID)
|
||||
handler.PendingActionsService.Create(portainer.PendingActions{
|
||||
EndpointID: endpoint.ID,
|
||||
Action: "CleanNAPWithOverridePolicies",
|
||||
ActionData: endpointGroup.ID,
|
||||
})
|
||||
log.Warn().Err(err).Msgf("Unable to update user authorizations for endpoint (%d) and endpoint group (%d).", endpoint.ID, endpointGroup.ID)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue