Skip to content

fix(inject): allow user to update atomic testing with assessment capability (#5784)#6387

Merged
camrrx merged 1 commit into
mainfrom
issue/5784
Jun 29, 2026
Merged

fix(inject): allow user to update atomic testing with assessment capability (#5784)#6387
camrrx merged 1 commit into
mainfrom
issue/5784

Conversation

@camrrx

@camrrx camrrx commented Jun 25, 2026

Copy link
Copy Markdown
Member

Proposed changes

  • Allow a user assigned to a role with the Assessment capability to update an existing atomic testing.

Testing Instructions

As an Admin:

  • Navigate to Settings → Security → Roles
  • Create a new role with the following capabilities enabled for Assessment:
    • Access
    • Manage
    • Delete
    • Launch
  • Navigate to Settings → Security → Groups
  • Create a new group and assign the role created above to it
  • Add a user to this group — ensure this user belongs only to this group

As the user in the newly created group:

  • Navigate to Atomic Testing
  • Open an existing atomic testing
  • Attempt to edit it
  • Observe that the inject form can be modified

Related issues

Copilot AI review requested due to automatic review settings June 25, 2026 12:56
@github-actions github-actions Bot added the filigran team Item from the Filigran team. label Jun 25, 2026
@Filigran-Automation Filigran-Automation changed the title fix(inject): allow user to udpate atomic testing with assessment capability (#5784) fix(inject): allow user to update atomic testing with assessment capability (#5784) Jun 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts frontend permission gating so users who have the Assessment – Manage capability can edit existing Atomic Testings (inject update form is no longer forced into read-only when the user lacks resource-grant MANAGE on the inject itself).

Changes:

  • Update the inject form disabled condition to allow editing when ability.can(MANAGE, ASSESSMENT) is true (even if the user cannot manage the specific inject resource by grant).
  • Keep existing protections intact (inject disabled, missing contract content, explicit permissions.readOnly, and non-NONE inherited context behavior).

@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.64%. Comparing base (aec82d3) to head (fe83ea5).
⚠️ Report is 1 commits behind head on main.

❌ Your project check has failed because the head coverage (2.95%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6387      +/-   ##
============================================
- Coverage     43.68%   43.64%   -0.04%     
  Complexity     6993     6993              
============================================
  Files          2252     2252              
  Lines         62094    62094              
  Branches       8179     8179              
============================================
- Hits          27124    27104      -20     
- Misses        33226    33246      +20     
  Partials       1744     1744              
Flag Coverage Δ
backend 65.93% <ø> (ø)
e2e 18.31% <ø> (-0.69%) ⬇️
frontend 2.95% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@GaetanSantucci GaetanSantucci left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test ok

@camrrx camrrx merged commit 17a3d86 into main Jun 29, 2026
41 checks passed
@camrrx camrrx deleted the issue/5784 branch June 29, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

filigran team Item from the Filigran team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: user with assessment manage role can no longer update an atomic testing

4 participants