From 16233048661ed54f8c8b49334d02ffb036c6599b Mon Sep 17 00:00:00 2001 From: Vishal Nayak Date: Sat, 23 Jan 2021 14:33:50 -0500 Subject: [PATCH 1/3] Move the declaration to a OSS build tag file to not have it collide with ent declarations --- vault/logical_system.go | 6 ------ vault/logical_system_util.go | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 vault/logical_system_util.go diff --git a/vault/logical_system.go b/vault/logical_system.go index 073ae82b26bb..698a5c0f7918 100644 --- a/vault/logical_system.go +++ b/vault/logical_system.go @@ -3835,12 +3835,6 @@ func (b *SystemBackend) handleLeaderStatus(ctx context.Context, req *logical.Req return httpResp, nil } -func (b *SystemBackend) verifyDROperationToken(f framework.OperationFunc, lock bool) framework.OperationFunc { - return func(ctx context.Context, req *logical.Request, d *framework.FieldData) (*logical.Response, error) { - return f(ctx, req, d) - } -} - func sanitizePath(path string) string { if !strings.HasSuffix(path, "/") { path += "/" diff --git a/vault/logical_system_util.go b/vault/logical_system_util.go new file mode 100644 index 000000000000..d529b392911b --- /dev/null +++ b/vault/logical_system_util.go @@ -0,0 +1,16 @@ +// +build !enterprise + +package vault + +import ( + "context" + + "github.com/hashicorp/vault/sdk/framework" + "github.com/hashicorp/vault/sdk/logical" +) + +func (b *SystemBackend) verifyDROperationToken(f framework.OperationFunc, lock bool) framework.OperationFunc { + return func(ctx context.Context, req *logical.Request, d *framework.FieldData) (*logical.Response, error) { + return f(ctx, req, d) + } +} From 318ee889a83bf635e35dd5a1a00beefe2a4a252b Mon Sep 17 00:00:00 2001 From: Vishal Nayak Date: Sun, 24 Jan 2021 10:21:53 -0500 Subject: [PATCH 2/3] Add comment --- vault/logical_system_util.go | 1 + 1 file changed, 1 insertion(+) diff --git a/vault/logical_system_util.go b/vault/logical_system_util.go index d529b392911b..010faf34f19a 100644 --- a/vault/logical_system_util.go +++ b/vault/logical_system_util.go @@ -11,6 +11,7 @@ import ( func (b *SystemBackend) verifyDROperationToken(f framework.OperationFunc, lock bool) framework.OperationFunc { return func(ctx context.Context, req *logical.Request, d *framework.FieldData) (*logical.Response, error) { + // Always succeed return f(ctx, req, d) } } From e6c46b3200260399e3c07814cf33e88f7f8f41c9 Mon Sep 17 00:00:00 2001 From: Vishal Nayak Date: Sun, 24 Jan 2021 10:22:30 -0500 Subject: [PATCH 3/3] Remove comment to trigger ci --- vault/logical_system_util.go | 1 - 1 file changed, 1 deletion(-) diff --git a/vault/logical_system_util.go b/vault/logical_system_util.go index 010faf34f19a..d529b392911b 100644 --- a/vault/logical_system_util.go +++ b/vault/logical_system_util.go @@ -11,7 +11,6 @@ import ( func (b *SystemBackend) verifyDROperationToken(f framework.OperationFunc, lock bool) framework.OperationFunc { return func(ctx context.Context, req *logical.Request, d *framework.FieldData) (*logical.Response, error) { - // Always succeed return f(ctx, req, d) } }