|
|
@@ -17,7 +17,7 @@ export const can = (action, subject) => {
|
|
|
* Based on item's action and resource
|
|
|
* @param {Object} item navigation object item
|
|
|
*/
|
|
|
-export const canViewVerticalNavMenuLink = item => can('read', item.route)
|
|
|
+export const canViewVerticalNavMenuLink = item => can('read', item.group)
|
|
|
|
|
|
/**
|
|
|
* Check if user can view item based on it's ability
|
|
|
@@ -42,7 +42,7 @@ export const canViewVerticalNavMenuGroup = item => {
|
|
|
* Based on item's action and resource
|
|
|
* @param {Object} item navigation object item
|
|
|
*/
|
|
|
-export const canViewVerticalNavMenuHeader = item => can(item.action, item.resource)
|
|
|
+export const canViewVerticalNavMenuHeader = item => can('read', item.group)
|
|
|
|
|
|
/**
|
|
|
* Check if user can view item based on it's ability
|