Skip to content

Commit

Permalink
Only show Flag PB button if user is admin or moderator
Browse files Browse the repository at this point in the history
  • Loading branch information
big213 committed Oct 16, 2021
1 parent c8a0015 commit beb8fb8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/models/personalBest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,11 @@ export const PersonalBest = <RecordInfo<'personalBest'>>{
{
text: 'Flag PB',
icon: 'mdi-flag',
showIf: (that, _item) => {
return ['ADMIN', 'MODERATOR'].includes(
that.$store.getters['auth/user']?.role
)
},
handleClick: flagPersonalBest,
},
],
Expand Down

0 comments on commit beb8fb8

Please sign in to comment.