mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
fix(kubernetes): run group permission when endpoint is up [EE-5427] (#10121)
* update group access when env is down * fix tests
This commit is contained in:
parent
d75a8027a5
commit
a02f9f1f07
7 changed files with 90 additions and 3 deletions
|
@ -10,6 +10,8 @@ import (
|
|||
"github.com/portainer/portainer/api/agent"
|
||||
"github.com/portainer/portainer/api/crypto"
|
||||
"github.com/portainer/portainer/api/dataservices"
|
||||
"github.com/portainer/portainer/api/http/utils"
|
||||
"github.com/portainer/portainer/api/internal/authorization"
|
||||
"github.com/portainer/portainer/api/internal/endpointutils"
|
||||
"github.com/portainer/portainer/pkg/featureflags"
|
||||
|
||||
|
@ -304,6 +306,11 @@ func updateEndpointStatus(tx dataservices.DataStoreTx, endpoint *portainer.Endpo
|
|||
Str("URL", endpoint.URL).Err(err).
|
||||
Msg("background schedule error (environment snapshot), unable to update environment")
|
||||
}
|
||||
|
||||
// Run the pending actions
|
||||
if latestEndpointReference.Status == portainer.EndpointStatusUp {
|
||||
utils.RunPendingActions(latestEndpointReference, tx, authorization.NewService(tx))
|
||||
}
|
||||
}
|
||||
|
||||
// FetchDockerID fetches info.Swarm.Cluster.ID if environment(endpoint) is swarm and info.ID otherwise
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue