From c540764408ade606c69c4f2d07f68320c0d62c43 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Fri, 14 Apr 2023 17:43:05 +0100 Subject: [PATCH] ensure we only fetch reports when we're an admin Ref #288 --- src/modules/users.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/users.js b/src/modules/users.js index 209d9675..9d81f9bc 100644 --- a/src/modules/users.js +++ b/src/modules/users.js @@ -644,7 +644,9 @@ const users = { store.dispatch('listSettingsProfiles') store.dispatch('startFetchingConfig') store.dispatch('startFetchingAnnouncements') - store.dispatch('startFetchingReports') + if (user.role === 'admin' || user.role === 'moderator') { + store.dispatch('startFetchingReports') + } // Fetch our friends store.rootState.api.backendInteractor.fetchFriends({ id: user.id })