Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Template admins are not allowed to cancel template import dry-run or workspace build jobs #16254

Open
@mafredri

Description

@mafredri

In #16252 it was discovered that template admins aren't allowed to cancel template dry-run jobs, nor workspace build jobs.

This is due to:

rbac.ResourceWorkspace.InOrg(templateVersion.OrganizationID).WithOwner(job.ProvisionerJob.InitiatorID.String())) {

And en explanation for it exists here:

// We use the workspace RBAC check since we don't want to allow dry runs if
// the user can't create workspaces.

I'm not sure the explanation makes sense, though, at least not for template version dry runs.

We should reconsider the RBAC requirements for cancellation. A template admin may very well need to cancel a workspace build as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions