From f79d7b35a4d143180d35460eb5003979cde55349 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Tue, 14 May 2024 12:41:17 -0400 Subject: [PATCH] Disallow creating accounts as a guest. #52 --- apps/identity/app.js | 2 +- core/client.js | 2 +- core/core.js | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/identity/app.js b/apps/identity/app.js index 6ed964af..274f9228 100644 --- a/apps/identity/app.js +++ b/apps/identity/app.js @@ -78,7 +78,7 @@ async function main() { alert('Successfully created: ' + id); await tfrpc.rpc.reload(); } catch (e) { - alert('Error creating identity: ' + e); + alert('Error creating identity: ' + e.message); } } handler.hide_id = function hide_id(event, element) { diff --git a/core/client.js b/core/client.js index e0e692a1..15ad38b0 100644 --- a/core/client.js +++ b/core/client.js @@ -208,7 +208,7 @@ class TfNavigationElement extends LitElement { `; - } else { + } else if (this.credentials?.session?.name && this.credentials.session.name !== 'guest') { return html`