From d6160a1c007edd12e760b00584d4798b71b75688 Mon Sep 17 00:00:00 2001 From: Matteo Bronkhorst <32799956+DrumsnChocolate@users.noreply.github.com> Date: Mon, 11 Sep 2023 20:29:04 +0200 Subject: [PATCH] slightly tweak canShowOwn and use it where appropriate (#806) --- 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 @@