Commit graph

188 commits

Author SHA1 Message Date
fc835dc982 feat: missing dependency injections on org endpoints 2026-05-27 15:59:12 +01:00
689443c05e feat: auth requirements to service endpoints 2026-05-27 15:45:31 +01:00
66c2a71c8a feat: auth requirements to org endpoints 2026-05-27 15:42:53 +01:00
789d7d9f7a feat: auth requirements to user endpoints 2026-05-27 15:36:21 +01:00
7e8ec08283 feat: auth requirements to iam endpoints 2026-05-27 15:35:06 +01:00
51bb48372c feat: auth dependency for root user with org in body 2026-05-27 15:34:18 +01:00
36736e5142 fix: auth dependency return values and types
Return values were all labelled as dicts instead of bools. Root user dependency now returns the org for which they are root user.
2026-05-27 15:22:32 +01:00
868e56ce40 feat: custom exceptions instead of direct fastapi.httpexceptions
Resolves #2
2026-05-27 14:58:10 +01:00
d3d3b2ca63 feat: auth dependencies
These dependencies require `user_model_claims_dependency` which requires the `claims_dependency`. This caused an import loop error and therefore they must be defined in a different file from `claims_dependency`.

Resolves #6
2026-05-27 14:30:11 +01:00
75f5bc79da feat: service dependencies
Issue #6
2026-05-27 14:29:09 +01:00
d0c8c6c297 minor: typo in org exception 2026-05-27 14:29:09 +01:00
748544fb82 feat: user dependencies
In addition to the by-query and by-body db fetch dependencies. Users also have a by-claim dependency.

Issue #6
2026-05-27 14:29:09 +01:00
657f91d73d feat: org dependencies
Org endpoints use query/body model dependencies to perform initial db lookups.

Issue #6

Org ID path params have been replaced with either query params (get endpoints) or body values.

Resolves #10

Endpoints in other modules that rely on an org model lookup have also been updated.
2026-05-27 12:21:30 +01:00
c6a2b301dc feat: iam dependencies
IAM endpoints now use dependencies to perform most initial database get requests.

Issue #6
2026-05-27 12:21:30 +01:00
d4f1b73deb feat: iam endpoint req/res models 2026-05-26 16:25:14 +01:00
fa8439cc6c feat: auth bypass for dev and testing
ENVIRONMENT must be "local" and DISABLE_AUTH set for this to be active. Both of these default to production values to prevent this being enabled accidentally.

Resolves #5
2026-05-26 11:42:49 +01:00
652dfb7b4a feat: service module req/res models 2026-05-26 10:16:59 +01:00
b3689c8af6 feat: org router refactor
- All TODOs done.
- org_model_dependency used for all applicable routes
- ORM relationships used to reduce number of queries being made and simplify endpoint code.
- Missing request and response models added.
- Small bug fixes
2026-05-25 16:54:45 +01:00
2b6d923ae1 feat: contact model restructure
Blank contacts are now generated on org creation and assigned to each contact type. These contacts are linked to the org, only accessible to the org, and removed when the org is removed.

With this all contact endpoints have been removed. Contact manipulation is done via the org only.
2026-05-25 15:15:50 +01:00
707482adc2 feat: condensed org get endpoints
The process also added improved ORM relationships for multiple models.
2026-05-25 12:40:28 +01:00
a80767d870 feat: condensed user get endpoints
The process also added improved ORM relationships for multiple models.
2026-05-25 12:06:24 +01:00
4ff184fe86 feat: sqlalchemy defined orgusers relationship 2026-05-25 10:21:15 +01:00
d51adb4e55 feat: org root user dependency 2026-05-25 09:54:46 +01:00
2a20172d78 fix: questionnaire patch route update for new model 2026-05-25 09:54:19 +01:00
804e21b871 fix: handling for unset org contacts 2026-05-25 09:32:40 +01:00
23f2ce98d7 feat: iam rbac system
Endpoints and db architecture to support a role based IAM system.
2026-05-25 09:05:17 +01:00
7b3ee9d5fa feat: db dependency upgrade
No longer using .begin() and context manager. This means commits must be explicit (already were) but also, it allows for sanity checks within routes after commits.
2026-05-21 16:55:15 +01:00
83a24a91f4 docs: user module
In-line and Swagger docs improvements on the User module and endpoints
2026-05-20 15:23:40 +01:00
6871fcd75d feat: handling for expired token
Returns a 401 with "Token expired" as the detail
2026-05-20 10:50:49 +01:00
34413b3fc5 feat: oidc claims response model 2026-05-20 10:42:07 +01:00
26db93b769 feat: user details updated in db on login 2026-05-20 10:06:36 +01:00
7d84f33bfa fix: intake questionnaire typing
The docs were not generating correctly when using the Json type. A class with placeholder properties has been created instead.
2026-05-19 12:55:46 +01:00
f54876eac6 minor: cleanup
Minor tweaks to reduce warnings in IDE e.g. unused imports.
2026-05-19 12:10:06 +01:00
d89c926a38 feat: org exists checks on orguser routes
Routes modifying the org-user table did not check if the org existed first.
2026-05-19 11:49:54 +01:00
6f4556a44b fix: corrected use of path param
Previously used `param: int = Path()` this worked but was incorrect.
Correct usage is `param: Annotated[int, Path()]`
2026-05-19 11:11:03 +01:00
2b8296d622 feat: combined admin dependency
org_or_super_admin_dependency can be used in place of org_admin_dependency to also allow super admins.
2026-05-19 11:08:22 +01:00
34cb4414c9 feat: auth library upgrade
The parts of Authlib used are now deprecated in favour of JoseRFC.
2026-05-19 09:49:27 +01:00
376a7a9fe5 Initial commit 2026-04-06 12:41:49 +01:00