Skip to content

"You don’t have permission to revert" when trying to revert job through the Nomad Web UI #26217

Open
@sforster-meteomatics

Description

@sforster-meteomatics

Nomad version

1.9.7

Operating system and Environment details

Clients & Servers: Debian 12
User OS: Ubuntu 24.04
User Browser. Firefox 139.0.1

Issue

Revert button in Web UI shows "You don’t have permission to revert" even though the token can revert job versions via the CLI.

Reproduction steps

  1. Run a job in a non default namespace, e.g. testspace
  2. Make a small change, run the job again
  3. Create a policy with the following permissions.
namespace "testspace" {
  policy = "write"
}

plugin {
  policy = "read"
}

node {
  policy = "read"
}

agent {
  policy = "read"
}
  1. Generate a token with the above policy.
  2. Try to revert the job to the previous version from the Web UI

Expected Result

Permissions should match between CLI and Web UI. It should be possible to revert a job with write access to the namespace.

Actual Result

Reverting a job through the Web UI is not possible without a management token. Very likely, the Web UI simply doesn't correctly check the permissions of the token, since it seems no requests are actually sent if the UI button is simply disabled.

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Needs Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions