-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/reinvite staff user #495
base: development
Are you sure you want to change the base?
Feat/reinvite staff user #495
Conversation
We'll need to merge #475 and rebase this branch, before we can merge this one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one small gap in checking the Cognito Status values
backend/compact-connect/lambdas/python/common/cc_common/data_model/user_client.py
Show resolved
Hide resolved
backend/compact-connect/lambdas/python/common/cc_common/data_model/user_client.py
Outdated
Show resolved
Hide resolved
backend/compact-connect/lambdas/python/common/tests/function/__init__.py
Show resolved
Hide resolved
d460d66
to
53eca9b
Compare
53eca9b
to
10419bb
Compare
@jlkravitz , this one is ready for you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Few nits/questions.
...end/compact-connect/lambdas/python/common/tests/function/test_data_model/test_user_client.py
Show resolved
Hide resolved
allowed_jurisdictions = get_allowed_jurisdictions(compact=compact, scopes=get_event_scopes(event)) | ||
|
||
# None means they are a compact admin - no jurisdiction restrictions at all | ||
user = config.user_client.get_user_in_compact(compact=compact, user_id=user_id) | ||
if allowed_jurisdictions is not None: | ||
allowed_jurisdictions = set(allowed_jurisdictions) | ||
user = config.user_client.get_user_in_compact(compact=compact, user_id=user_id) | ||
user_jurisdictions = user['permissions']['jurisdictions'].keys() | ||
common_jurisdictions = allowed_jurisdictions.intersection(user_jurisdictions) | ||
|
||
# We won't show that the user even exists, if they have no common jurisdictions | ||
if not common_jurisdictions: | ||
raise CCNotFoundException('User not found') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In what scenario will this fail, and why is this code necessary to reinvite a user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will return a 404 in the event that a user calls this endpoint with an id for a user they don't have permission to see (i.e. a board admin in Ohio tries to reinvite a user who has no permissions in Ohio).
...ompact-connect/lambdas/python/staff-users/tests/function/test_handlers/test_reinvite_user.py
Outdated
Show resolved
Hide resolved
@jlkravitz all resolved, I think |
Description List
POST staff-user/:userId/reinvite
endpoint that will resend an invite email, resetting the user's password if necessaryTesting List
Closes #
closes #476