Skip to content

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

Open
vcnainala wants to merge 1 commit into
developmentfrom
fix/738-allow-curator-edit-report
Open

fix(reports): allow assigned curators to edit all report fields#809
vcnainala wants to merge 1 commit into
developmentfrom
fix/738-allow-curator-edit-report

Conversation

@vcnainala

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)

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

1 participant