From 3e38380d7c6a84bd9ecb53752a22aea86c35a53d Mon Sep 17 00:00:00 2001 From: DrumsnChocolate Date: Mon, 11 Sep 2023 15:58:22 +0200 Subject: [PATCH] slightly tweak canShowOwn and use it where appropriate --- app/abilities/user.js | 2 +- app/components/menu-sidebar.hbs | 2 +- app/routes/profile.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/abilities/user.js b/app/abilities/user.js index e3e434340..3ee1ca912 100644 --- a/app/abilities/user.js +++ b/app/abilities/user.js @@ -14,7 +14,7 @@ export default class User extends Ability { } get canShowOwn() { - return this.session.isAuthenticated; + return this.session.isAuthenticated && this.session.currentUser?.id; } get canCreate() { diff --git a/app/components/menu-sidebar.hbs b/app/components/menu-sidebar.hbs index 447641f3c..3ac36eab1 100644 --- a/app/components/menu-sidebar.hbs +++ b/app/components/menu-sidebar.hbs @@ -37,7 +37,7 @@