From e976a3ffe064353ab7a5f2f222cd9a4037b1acf8 Mon Sep 17 00:00:00 2001 From: Tim Gross Date: Thu, 19 May 2022 14:49:22 +0000 Subject: [PATCH] backport of commit 0d1eeddc19ab440a45f5251eb0a73dfe2fc56172 --- .changelog/13065.txt | 3 +++ api/jobs.go | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .changelog/13065.txt diff --git a/.changelog/13065.txt b/.changelog/13065.txt new file mode 100644 index 00000000000..1f367db488c --- /dev/null +++ b/.changelog/13065.txt @@ -0,0 +1,3 @@ +```release-note:bug +api: Fixed a bug where Consul token was not respected for job revert API +``` diff --git a/api/jobs.go b/api/jobs.go index 61d0c2892ce..7c0393cc43e 100644 --- a/api/jobs.go +++ b/api/jobs.go @@ -432,8 +432,8 @@ func (j *Jobs) Revert(jobID string, version uint64, enforcePriorVersion *uint64, JobID: jobID, JobVersion: version, EnforcePriorVersion: enforcePriorVersion, - // ConsulToken: consulToken, // TODO(shoenig) enable! - VaultToken: vaultToken, + ConsulToken: consulToken, + VaultToken: vaultToken, } wm, err := j.client.write("/v1/job/"+url.PathEscape(jobID)+"/revert", req, &resp, q) if err != nil {