Skip to content

Feat/EAP visibility - #2860

Merged
susilnem merged 3 commits into
developfrom
feature/eap-visibilty
Oct 15, 2026
Merged

susilnem merged 3 commits into
developfrom
feature/eap-visibilty

Conversation

@susilnem

@susilnem susilnem commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Changes

  • Expand permissions based on different roles
  • Update error message on status update
  • Separate EAPRevisePermission for Revise and BasePermission
  • Scope EAP querysets so a user only sees the EAPs they created, that were
    shared with them, or that belong to a National Society or region they
    administer; superusers and IFRC admins are unrestricted, as in Dref
  • Applied to the EAPRegistration, SimplifiedEAP, FullEAP, EAPShareUser and
    ActiveEAP viewsets, so out-of-scope objects return 404 instead of 403
  • Allow the creator and shared users to update an EAP, not only country and
    region admins
  • Order the m2m assertions in test_snapshot_full_eap

Checklist

Things that should succeed before merging.

  • Updated/ran unit tests
  • Updated CHANGELOG.md

Release

If there is a version update, make sure to tag the repository with the latest version.

@susilnem
susilnem force-pushed the feature/eap-visibilty branch from 7316680 to 1269e7d Compare October 8, 2026 04:44
- Scope EAP querysets so a user only sees the EAPs they created, that were
  shared with them, or that belong to a National Society or region they
  administer; superusers and IFRC admins are unrestricted, as in Dref
- Applied to the EAPRegistration, SimplifiedEAP, FullEAP, EAPShareUser and
  ActiveEAP viewsets, so out-of-scope objects return 404 instead of 403
- Allow the creator and shared users to update an EAP, not only country and
  region admins
- Guard application create: has_object_permission is never called on create,
  so POST /simplified-eap/ and /full-eap/ were open to any logged-in user,
  and creating an application locks the registration
- Order the m2m assertions in test_snapshot_full_eap
…ions

- Under Development -> Under Review had no permission check, while
  NS Addressing Comments -> Under Review checked country admin, IFRC admin
  and creator-or-shared. A region admin who had not created the EAP could
  therefore submit it but not resubmit it after IFRC comments
- Add has_submit_permission and use it for both, so submitting is open to
  the same people who can edit the EAP: the National Society's admins, its
  region's admins, the creator and the shared users
@susilnem
susilnem force-pushed the feature/eap-visibilty branch from 1269e7d to 099cdf7 Compare October 12, 2026 05:12
@susilnem
susilnem marked this pull request as ready for review October 13, 2026 04:10
@susilnem

Copy link
Copy Markdown
Member Author

@szabozoltan69 , Can you also merge this pull request and deploy on staging?

@susilnem
susilnem merged commit e048fcf into develop Oct 15, 2026
6 checks passed
@susilnem
susilnem deleted the feature/eap-visibilty branch October 15, 2026 04:05
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