Sfoglia il codice sorgente

Only show Reports tab in Interactions when privileged to see reports

Ilja 2 anni fa
parent
commit
131d310703
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/components/interactions/interactions.js

+ 1 - 1
src/components/interactions/interactions.js

@@ -15,7 +15,7 @@ const Interactions = {
     return {
       allowFollowingMove: this.$store.state.users.currentUser.allow_following_move,
       filterMode: tabModeDict.mentions,
-      canSeeReports: ['moderator', 'admin'].includes(this.$store.state.users.currentUser.role)
+      canSeeReports: this.$store.state.users.currentUser.privileges.includes('reports_manage_reports')
     }
   },
   methods: {