Fix display of navbar links to admins, closes #1920

This commit is contained in:
Dane Everitt
2020-04-17 10:21:15 -07:00
parent 4193c5f664
commit e969344f3b
8 changed files with 67 additions and 39 deletions

View File

@@ -15,7 +15,6 @@ export const usePermissions = (action: string | string[]): boolean[] => {
// will return if the user has any permission under the file.XYZ namespace.
(
permission.endsWith('.*') &&
permission !== 'websocket.*' &&
userPermissions.filter(p => p.startsWith(permission.split('.')[0])).length > 0
) ||
// Otherwise just check if the entire permission exists in the array or not.