SQSERVICES 1099 Public API end-point for re-sending email validation#1948
Conversation
|
(ci failure seems unrelated) |
Co-authored-by: fisx <mf@zerobuzz.net>
Co-authored-by: fisx <mf@zerobuzz.net>
|
TODO: Integration tests. |
fisx
left a comment
There was a problem hiding this comment.
All but 3 of these comments are just because it's late and I'm chatty, hope that's not too annoying. I think you're close! Let's see if concourse agrees.
| where | ||
| select :: PrepQuery R (Identity UserId) (Identity (Maybe ApiFt.TeamFeatureStatusValue)) | ||
| select = fromString $ "select feature_conference_calling from user where id = ?" | ||
| select = fromString "select feature_conference_calling from user where id = ?" |
There was a problem hiding this comment.
Ideally, these changes would go into a separate PR.
There was a problem hiding this comment.
I know, but this makes the barrier for improving the code on the fly much higher.
|
Ah, and can you try and complete the checkbox list? In the next pairing session we can go through the things you'd prefer to do together before anything else. |
Co-authored-by: fisx <mf@zerobuzz.net>
Co-authored-by: fisx <mf@zerobuzz.net>
908ec1a to
e2b8d82
Compare
e2b8d82 to
1743a06
Compare
fisx
left a comment
There was a problem hiding this comment.
LGTM! I have two more change requests, but neither is essential, so I've (pre-)approved this PR and leave you with deciding if you think you should follow up on them.
| -- and then assert that if the email is verified there is no new activation code created | ||
| -- when the set email function is called again (idempotency) | ||
| checkSetUserEmail teamOwner emailOwner newEmail 200 | ||
| checkUnauthorizedRequests emailOwner otherTeamMember teamOwnerDifferentTeam newEmail |
There was a problem hiding this comment.
Can we remove this line? ff not, can you add a comment helping me to find out what this is testing?
There was a problem hiding this comment.
Line 168: Ideally if the email has been verified the team owner can call the endpoint again and nothing will happen (no new activation code will be generated). In order to test this specifically we would have to wait until the activation code expires. This is too costly for the test, but at least we can test that the request still responds with status code 200 in this case.
Line: 169: Similar, if the request is made with insufficient permissions, the responses should be the same as before (regardless of the state of the activation)
There was a problem hiding this comment.
Maybe these are not the most useful tests, but they don't hurt.
There was a problem hiding this comment.
As discussed in another conversation, I added the expiration of the token again, so this conversation is obsolete, I think.
Co-authored-by: fisx <mf@zerobuzz.net>
Co-authored-by: fisx <mf@zerobuzz.net>
not sure where this rpc error is coming from, but probably not from a compilation error? |
Checklist
make git-add-cassandra-schemato update the cassandra schema documentation.changelog.d.