Skip to content

Change AdminContextDep to UserContextDep for Person, Organization, Consortium create (#688) - #690

Merged
eleftherioszisis merged 2 commits into
mainfrom
688-user-context-person-org-consortium
Jul 30, 2026
Merged

Change AdminContextDep to UserContextDep for Person, Organization, Consortium create (#688)#690
eleftherioszisis merged 2 commits into
mainfrom
688-user-context-person-org-consortium

Conversation

@eleftherioszisis

@eleftherioszisis eleftherioszisis commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Change AdminContextDep to UserContextDep for create_one in Person, Organization, and Consortium services, allowing regular authenticated users to create these entities.
  • Update and delete remain admin-only (AdminContextDep).
  • Update tests to use regular user client for create operations instead of admin client.

Closes #688

Note: This PR depends on #686 which needs to be merged first.

Test plan

  • Verify regular users can create Person, Organization, and Consortium entities
  • Verify update remains restricted to admins
  • Verify delete remains restricted to admins (403 for regular users)
  • All 14 existing tests pass

@eleftherioszisis eleftherioszisis changed the title Change AdminContextDep to UserContextDep for Person, Organization, Consortium create/update Change AdminContextDep to UserContextDep for Person, Organization, Consortium create (#688) Jul 29, 2026
@eleftherioszisis eleftherioszisis self-assigned this Jul 29, 2026
@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
pytest 97.85% <100.00%> (ø)

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

Files with missing lines Coverage Δ
app/service/consortium.py 94.28% <100.00%> (ø)
app/service/organization.py 94.28% <100.00%> (ø)
app/service/person.py 94.28% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…nsortium create/update (#688)

Allow regular authenticated users to create and update Person, Organization,
and Consortium entities instead of requiring service admin privileges.
Delete remains admin-only.
…n, Organization, Consortium (#688)

Allow regular authenticated users to create Person, Organization, and
Consortium entities. Update and delete remain admin-only.
@eleftherioszisis
eleftherioszisis force-pushed the 688-user-context-person-org-consortium branch from 8f9691f to 25888b9 Compare July 30, 2026 06:56
@eleftherioszisis
eleftherioszisis merged commit 1016b98 into main Jul 30, 2026
2 checks passed
@eleftherioszisis
eleftherioszisis deleted the 688-user-context-person-org-consortium branch July 30, 2026 07:11
GianlucaFicarelli added a commit that referenced this pull request Jul 30, 2026
* origin/main:
  Change AdminContextDep to UserContextDep for Person, Organization, Consortium create (#688) (#690)
  Strict update schemas: forbid extras and merge exclusions (#687)
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.

Allow users to register agents

2 participants