From e1fccd2a66382f7a942a6d76d8ed1b3bb84cb745 Mon Sep 17 00:00:00 2001
From: hippoz <10706925-hippoz@users.noreply.gitlab.com>
Date: Thu, 4 Aug 2022 04:51:09 +0300
Subject: [PATCH] hide "add channel" button if the user cant create channels +
public user object now shows permissions
---
frontend/src/components/Sidebar.svelte | 14 ++++++++------
src/auth.ts | 9 ++++++++-
2 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/frontend/src/components/Sidebar.svelte b/frontend/src/components/Sidebar.svelte
index 3aa6511..579a246 100644
--- a/frontend/src/components/Sidebar.svelte
+++ b/frontend/src/components/Sidebar.svelte
@@ -49,12 +49,14 @@
{/if}
{/each}
-
+ {#if $userInfoStore && $userInfoStore.permissions.create_channel}
+
+ {/if}