1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

feat(endpointedge): add support for transactions EE-5327 (#8961)

This commit is contained in:
andres-portainer 2023-05-18 14:58:33 -03:00 committed by GitHub
parent 881fa01eb2
commit db93e5880f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 125 additions and 23 deletions

View file

@ -151,12 +151,12 @@ func (bouncer *RequestBouncer) AuthorizedEdgeEndpointOperation(r *http.Request,
// TrustedEdgeEnvironmentAccess defines a security check for Edge environments, checks if
// the request is coming from a trusted Edge environment
func (bouncer *RequestBouncer) TrustedEdgeEnvironmentAccess(endpoint *portainer.Endpoint) error {
func (bouncer *RequestBouncer) TrustedEdgeEnvironmentAccess(tx dataservices.DataStoreTx, endpoint *portainer.Endpoint) error {
if endpoint.UserTrusted {
return nil
}
settings, err := bouncer.dataStore.Settings().Settings()
settings, err := tx.Settings().Settings()
if err != nil {
return errors.WithMessage(err, "could not retrieve the settings")
}