Skip to content

fix(reports): allow assigned curators to edit all report fields - #809

Merged
vcnainala merged 2 commits into
developmentfrom
fix/738-allow-curator-edit-report
Jun 22, 2026
Merged

vcnainala merged 2 commits into
developmentfrom
fix/738-allow-curator-edit-report

Conversation

@vcnainala

@vcnainala vcnainala commented Jun 7, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes #738.

  • Add Report::assignedCuratorCanEdit() to centralize two-curator / four-eyes edit rules on the model
  • Update ReportPolicy::update() so users with the curator role or update_report permission can edit when assigned
  • Grant view_any_report, view_report, and update_report to the curator role in ShieldSeeder
  • Unlock all UPDATE change fields on the edit page so curators can modify any field, not only those requested by the reporter

Test plan

  • php artisan test --filter=ReportPolicy (6 tests)
  • Log in as curator assigned to a SUBMITTED UPDATE report and confirm the edit page opens
  • Confirm all compound-info / organism / citation tabs are editable
  • Save and verify suggested_changes.curator reflects edits
  • Confirm curator 1 cannot edit during PENDING_APPROVAL (four-eyes)

vcnainala added 2 commits June 7, 2026 18:22
Assigned curators were blocked from editing reports by missing Shield
permissions and UPDATE-field gating tied to reporter requests. Centralize
curator edit authorization on the Report model, grant curator report
permissions in the seeder, and unlock all change fields on edit.

Closes #738
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.17%. Comparing base (a4c26c6) to head (dfd8740).
⚠️ Report is 18 commits behind head on development.

Files with missing lines Patch % Lines
...oard/Resources/ReportResource/Pages/EditReport.php 0.00% 11 Missing ⚠️
app/Models/Report.php 93.75% 1 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                 @@
##             development     #809       +/-   ##
==================================================
+ Coverage           6.14%   17.17%   +11.02%     
- Complexity          1736     1873      +137     
==================================================
  Files                227      234        +7     
  Lines               8945     9584      +639     
==================================================
+ Hits                 550     1646     +1096     
+ Misses              8395     7938      -457     

☔ 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.

@vcnainala
vcnainala merged commit 932e172 into development Jun 22, 2026
6 checks passed
@vcnainala
vcnainala deleted the fix/738-allow-curator-edit-report branch June 22, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants