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:
parent
881fa01eb2
commit
db93e5880f
6 changed files with 125 additions and 23 deletions
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue