From 7e985aca60a7715c6948d23904b3c693dd05f8f3 Mon Sep 17 00:00:00 2001 From: hc-github-team-nomad-core <82989552+hc-github-team-nomad-core@users.noreply.github.com> Date: Tue, 2 Jul 2024 15:52:11 -0400 Subject: [PATCH] backport of commit bbd1bb3485858acc0ce0de9dcb32c9aeca091d3a (#23469) Co-authored-by: Phil Renaud --- .changelog/23458.txt | 3 +++ ui/app/templates/components/job-editor.hbs | 2 +- .../templates/components/job-editor/edit.hbs | 18 ++++++++++-------- ui/app/templates/jobs/run/templates/manage.hbs | 7 +++++-- 4 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 .changelog/23458.txt diff --git a/.changelog/23458.txt b/.changelog/23458.txt new file mode 100644 index 00000000000..ed8d6fd91d4 --- /dev/null +++ b/.changelog/23458.txt @@ -0,0 +1,3 @@ +```release-note:bug +ui: Fix an issue where access to Job Templates in the UI was restricted to variable.write access +``` diff --git a/ui/app/templates/components/job-editor.hbs b/ui/app/templates/components/job-editor.hbs index 4dcfbb8b76e..f9532e12906 100644 --- a/ui/app/templates/components/job-editor.hbs +++ b/ui/app/templates/components/job-editor.hbs @@ -16,7 +16,7 @@ Paste or author HCL or JSON to submit to your cluster, or select from a list of templates. A plan will be requested before the job is submitted. You can also attach a job spec by uploading a job file or dragging & dropping a file to the editor.

- {{#if (can "write variable" path="*" namespace="*")}} + {{#if (can "read variable" path="nomad/job-templates/*" namespace="*")}}