From 70ccb9b26469ef8be397dcc3345bf88db1c6d497 Mon Sep 17 00:00:00 2001
From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
Date: Sun, 18 Dec 2022 13:09:42 +0100
Subject: [PATCH] app.js: Request NeedReboot only if admin

---
 src/store/modules/app.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/store/modules/app.js b/src/store/modules/app.js
index e06953aa..b585da5b 100644
--- a/src/store/modules/app.js
+++ b/src/store/modules/app.js
@@ -51,6 +51,9 @@ const app = {
       commit('CLOSE_SIDEBAR', withoutAnimation)
     },
     async NeedReboot({ commit, getters }) {
+      if (!getters.roles.includes('admin')) {
+        return
+      }
       const response = await needReboot(getters.authHost, getters.token)
       commit('TOGGLE_REBOOT', response.data['need_reboot'])
     },
-- 
GitLab