Skip to content

Check correct permissions before showing Release Evidence link

Alishan Ladhani requested to merge ali/fix-release-evidence-permission into master

What does this MR do and why?

Change EvidenceType to check if user is authorized to read_release_evidence. This rule is already used when downloading Release Evidence (see controller).

The read_release_evidence rule checks download_code and a few other rules internally (see policy).

Related to #208397 (closed)

Screenshots or screen recordings

When user can read_release_evidence

Screen_Shot_2021-11-02_at_4.15.42_PM

When user cannot read_release_evidence

Screen_Shot_2021-11-02_at_4.16.42_PM

How to set up and validate locally

  1. Create a Release.
  2. Wait for Release Evidence to be created.
    • The Release should show a link to the Evidence (see screenshots above).
  3. Turn off Issues in the project's settings.
    • read_release_evidence requires read_issue, so it will return false when Issues are turned off.
  4. The Release should not show a link to the Evidence anymore.

MR acceptance checklist

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

Edited by Alishan Ladhani

Merge request reports

Loading