From 70938f467dce06dfe5efc6b6988e08e944405705 Mon Sep 17 00:00:00 2001
From: Hangzhi Yu <hangzhi@protonmail.com>
Date: Wed, 26 Apr 2023 02:37:53 +0200
Subject: [PATCH] Add permission check to menu point

---
 CHANGELOG.rst                         | 1 +
 aleksis/apps/matrix/frontend/index.js | 1 +
 2 files changed, 2 insertions(+)

diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 9fa9025..58f194b 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -14,6 +14,7 @@ Fixed
 ~~~~~
 
 * The Matrix groups and rooms threw a 404 error.
+* The Matrix parent menu point was displayed even though the user had no permission to see it.
 
 `2.0b0` - 2023-02-23
 --------------------
diff --git a/aleksis/apps/matrix/frontend/index.js b/aleksis/apps/matrix/frontend/index.js
index 6113a60..ff49390 100644
--- a/aleksis/apps/matrix/frontend/index.js
+++ b/aleksis/apps/matrix/frontend/index.js
@@ -3,6 +3,7 @@ export default {
     inMenu: true,
     titleKey: "matrix.menu_title",
     icon: "mdi-forum-outline",
+    permission: "matrix.view_matrixrooms_rule",
   },
   props: {
     byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
-- 
GitLab