Apply OSS part of ENT change re waitForReplicationState. (#10837)
This commit is contained in:
parent
c62ce48b5b
commit
75c955b3c3
|
@ -443,11 +443,16 @@ func (c *Core) handleCancelableRequest(ctx context.Context, ns *namespace.Namesp
|
|||
return logical.ErrorResponse("cannot write to a path ending in '/'"), nil
|
||||
}
|
||||
|
||||
err = waitForReplicationState(ctx, c, req)
|
||||
waitGroup, err := waitForReplicationState(ctx, c, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Decrement the wait group when our request is done
|
||||
if waitGroup != nil {
|
||||
defer waitGroup.Done()
|
||||
}
|
||||
|
||||
if !hasNamespaces(c) && ns.Path != "" {
|
||||
return nil, logical.CodedError(403, "namespaces feature not enabled")
|
||||
}
|
||||
|
|
|
@ -4,12 +4,15 @@ package vault
|
|||
|
||||
import (
|
||||
"context"
|
||||
"sync"
|
||||
|
||||
"github.com/hashicorp/vault/helper/identity"
|
||||
"github.com/hashicorp/vault/sdk/logical"
|
||||
)
|
||||
|
||||
func waitForReplicationState(context.Context, *Core, *logical.Request) error { return nil }
|
||||
func waitForReplicationState(context.Context, *Core, *logical.Request) (*sync.WaitGroup, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func checkNeedsCG(context.Context, *Core, *logical.Request, *logical.Auth, error, []string) (error, *logical.Response, *logical.Auth, error) {
|
||||
return nil, nil, nil, nil
|
||||
|
|
Loading…
Reference in New Issue