File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -324,6 +324,16 @@ impl super::Nexus {
324324 . fetch ( )
325325 . await ?;
326326
327+ // We could use a transaction here for these two queries, but it seems
328+ // unnecessary. If the token delete succeeds but the session delete
329+ // fails, the user will get an error response to the logout request,
330+ // but it will have worked halfway. That is _slightly_ surprising if
331+ // they expect the tokens to still be there after that, but at least
332+ // the error makes clear they have to hit the endpoint again to be sure
333+ // everything is gone. The half-deleted state doesn't break anything,
334+ // either, except what it's supposed to break: the user's ability to
335+ // authenticate with tokens.
336+
327337 let authz_token_list =
328338 authz:: SiloUserTokenList :: new ( authz_silo_user. clone ( ) ) ;
329339 self . datastore ( )
Original file line number Diff line number Diff line change @@ -634,7 +634,7 @@ async fn test_admin_logout_deletes_tokens_and_sessions(
634634) {
635635 let testctx = & cptestctx. external_client ;
636636
637- // create a user have a user ID on hand to use in the authn_as
637+ // create users so we can have user IDs to pass to authn_as
638638 let silo_url = "/v1/system/silos/test-suite-silo" ;
639639 let test_suite_silo: views:: Silo = object_get ( testctx, silo_url) . await ;
640640 let user1 = create_local_user (
You can’t perform that action at this time.
0 commit comments