Skip to content

This MR adds disabled state for runner tags

Artur Fedorov requested to merge 389554-make-runner-tags-readonly into master

What does this MR do and why?

Describe in detail what your merge request does and why.

This MR resolves #389554 (closed) and 390153

The result of this issue should be:

  1. User is an owner or a maintainer
    • New scan -> User can see dropdown, load list with tags and set it for scanner
    • Edit scan -> User can see previously saved tags, load list of tags and edit it

  1. User is neither owner nor maintainer
    • New scan -> User can't see dropdown with tags at all
    • Edit scan -> User can see previously saved tags as a text entry without editing functionality

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Allowed to edit Not allowed to edit
Screenshot_2023-01-28_at_01.29.48 Screenshot_2023-01-28_at_01.29.31

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Enable flag by enabling rails console in terminal
   Feature.enable(:on_demand_scans_runner_tags)
  1. Assign yourself or any other user developer role in any project Project information -> Members
  2. Go to /PROJECT_ID/-/on_demand_scans/SCAN_ID/edit or on_demand_scans/-/on_demand_scans/new
  3. Or you can access it via UI from -/on_demand_scans#/saved
  4. Runner tags section should be enabled for owners and maintainers and disabled for other users

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #389554 (closed)

Edited by Artur Fedorov

Merge request reports