mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-11 23:04:52 +09:00
Handle SessionLost when deleting your own account
Deleting your own account now terminates the session immediately, so the web UI received a SessionLost rejection and reported "Error deleting user" for a delete that had succeeded. Use the same branch revoke does. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
1da7c1da67
commit
c9e8aeee5c
1 file changed
+7
@@ -146,6 +146,13 @@ export default function UserViewPage() {
|
||||
new lib.UserDeleteRequest(userName)
|
||||
).then(() => {
|
||||
navigate("/users");
|
||||
}, err => {
|
||||
if (err instanceof lib.SessionLost && userName === account.name) {
|
||||
// Got kicked out after deleting our own account
|
||||
navigate("/users");
|
||||
return;
|
||||
}
|
||||
throw err;
|
||||
}).catch(notifyErrorHandler("Error deleting user"));
|
||||
}}
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user