Skip to content
Snippets Groups Projects
Commit 4f120d82 authored by Ilja's avatar Ilja Committed by Haelwenn
Browse files

Don't call reports count when not privileged

The sidebar shows the report count. Even when not privileged, the call was done to get the count.
parent 9dd49c33
Branches
No related tags found
1 merge request!324Forward-port: Handle moderation privileges
......@@ -35,6 +35,7 @@ export default {
...mapGetters([
'permission_routers',
'roles',
'privileges',
'sidebar',
'tabs'
]),
......@@ -46,7 +47,9 @@ export default {
}
},
mounted() {
this.$store.dispatch('FetchOpenReportsCount')
if (this.privileges?.indexOf('reports_manage_reports') !== -1) {
this.$store.dispatch('FetchOpenReportsCount')
}
},
methods: {
getMergedRoutes() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment