label: nav[k].label || k,
route: route
});
+ let shouldAllow = nav[k].allow || ['*'];
if (nav[k].pluginName == currentPlugin) {
navClass += " active";
}
navItem.priority = nav[k].priority;
navItem.order = nav[k].order;
if(nav[k].admin_link) {
- adminNav.push((
- <li key={nav[k].name}>
- {dashboardLink}
- </li>
- ))
+
+ if (isRBACValid(User, shouldAllow) ){
+ adminNav.push((
+ <li key={nav[k].name}>
+ {dashboardLink}
+ </li>
+ ))
+ }
} else {
- let shouldAllow = nav[k].allow || ['*'];
if (isRBACValid(User, shouldAllow) ){
navItem.html = (
<div key={k} className={navClass}>
"order": 1,
"priority":2,
"admin_link": true,
+ "allow": ["rw-rbac-platform:super-admin", "rw-rbac-platform:platform-admin", "rw-rbac-platform:platform-oper", "rw-project:project-admin", "rw-project:project-oper"],
"routes": [
{
"label": "Project Management Dashboard",