Commit Graph

28 Commits

Author SHA1 Message Date
Kenneth Kehl
24aea5efc3 remove debug 2024-04-01 12:48:30 -07:00
Kenneth Kehl
97ba070b0e debug staging 2024-03-28 11:19:02 -07:00
Kenneth Kehl
8d48ec4c87 fix invitations 2024-03-22 11:18:47 -07:00
Kenneth Kehl
1a9800f924 fix tests 2024-03-19 13:23:22 -07:00
Kenneth Kehl
93d9ab62e4 login.gov first time workflow notify-api-1250 2024-03-19 07:34:23 -07:00
Kenneth Kehl
b777249b6f merge from main 2024-03-01 13:50:09 -08:00
Cliff Hill
9523cc1d97 Cleaning up with black, isort, flake8.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2024-02-28 12:43:33 -05:00
Cliff Hill
7416de2a28 KeyType implemented.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2024-02-28 12:43:33 -05:00
Cliff Hill
3982f061b6 Made enums.py for all the enums to avoid cyclic imports.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2024-02-28 12:43:31 -05:00
Cliff Hill
820ee5a942 Cleaning up a lot of things, getting Enums used everywhere.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2024-02-28 12:40:52 -05:00
Kenneth Kehl
b5a0562077 fix tests 2024-01-24 07:55:14 -08:00
Kenneth Kehl
6dc9828663 fix tests 2024-01-22 10:55:09 -08:00
Cliff Hill
affc5e7aff Fixing stuff.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2023-12-20 09:51:43 -05:00
Cliff Hill
ff70dc9b8b Filtering the rest endpoint for resending invites by status = pending
now.

Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2023-12-20 08:15:19 -05:00
Cliff Hill
61d294292b Did stuff, fixed things. This seems to work now.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2023-12-15 13:14:53 -05:00
Cliff Hill
e4f228ca0d More test fixes.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2023-12-08 22:01:27 -05:00
Cliff Hill
1157f5639d black, isort, flake8
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2023-12-08 21:43:52 -05:00
Cliff Hill
991d9aa621 Made new /resend route in api.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2023-12-05 23:03:44 -05:00
Cliff Hill
8350408512 Working on getting tests working.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2023-11-13 16:00:11 -05:00
Kenneth Kehl
1ecb747c6d reformat 2023-08-29 14:54:30 -07:00
Kenneth Kehl
5a350560d7 notify-api-433b remove research mode 2023-08-25 12:09:00 -07:00
stvnrlly
57f4df8ed1 remove broadcast-related code, except migrations 2022-10-04 15:28:27 +00:00
Katie Smith
8ae2b0bb31 Replace how .dump is called
As with `.load`, only data is now returned instead of a tuple.
2022-05-25 11:35:44 +01:00
Katie Smith
bd4f74b359 Replace how .load is called
https://marshmallow.readthedocs.io/en/stable/upgrading.html#schemas-are-always-strict

`.load` doesn't return a `(data, errors)` tuple any more - only data is
returned. A `ValidationError` is raised if validation fails. The code
now relies on the `marshmallow_validation_error` error handler to handle
errors instead of having to raise an `InvalidRequest`. This has no
effect on the response that is returned (a test has been modified to
check).

Also added a new `password` field to the `UserSchema` so that we don't
have to specially check for password errors in the `.create_user` endpoint
- we can let marshmallow handle them.
2022-05-25 11:35:44 +01:00
Leo Hemsted
ebd4eda8bd remove duplicate dao invite fns and improve naming 2021-03-12 13:56:05 +00:00
Leo Hemsted
58896e194d add new invite/<token_type>/check/<token> endpoint
having `/invite/service/<token>` and `/invite/service/<id>` as two
separate routes (the first to validate an invite token, the second to
retrieve invite metadata) technically works. Routes are matched from
first to last until a match is found. The metadata endpoint only accepts
UUIDs, so requests with a UUID will be picked up by the correct
endpoint, while requests that don't look like a UUID will carry on
searching for an endpoint, and will find the token validation endpoint.

So while this works correctly for our normal expected input, it only
does so _because the UUID endpoint is first in the file_. This isn't
great, and it makes it harder to reason about the URLs when looking at
them.

To solve this, create the new `invite/service/check/<token>` endpoint.
For backwards compatibility, assign this in parallel with the existing
route - once the admin uses the new route we can remove the old route
and make better guarantees about what endpoint is being hit.
2021-03-12 13:56:01 +00:00
Leo Hemsted
eab4a75e29 remove the global_invite (accept_invite) endpoint
move the endpoints into service_invite/rest.py and
organisation/invite_rest.py respectively. Remove the prefix from all the
blueprints to allow this.
2021-03-12 13:55:55 +00:00
Leo Hemsted
d94d0bc8d7 rename invite blueprints
nb: the routes are not changing as part of this, only file paths and
blueprint names.

invite -> service_invite

this blueprint handles fetching invites for a service, creating invites,
etc.

accept_invite -> global_invite

this blueprint handles accepting invites for now, but will also involve
retrieving service/org user invite data without knowing the service/org
id associated. i'm not in love with this name and open to suggestions,
but i wanted to contrast it from service_invite and
organisation/invite_rest.py.
2021-03-12 13:55:43 +00:00