Skip to content

Commit

Permalink
wip - link to correct paths in top navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
andaley committed Oct 8, 2019
1 parent 149adb2 commit 1d4d860
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 1 addition & 3 deletions ui/app/helpers/has-permission.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ export default Helper.extend({
compute([route], params) {
let { routeParams, capabilities } = params;
let permissions = this.permissions;
if (route === 'access') {
debugger;
}

return permissions.hasNavPermission(route, routeParams, capabilities);
},
});
5 changes: 5 additions & 0 deletions ui/app/services/permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ export default Service.extend({
return path.split('/').lastObject;
}

if (navItem === 'access') {
// return the route param for the first path they have access to
// we will need to do the same thing for policies
}

return API_PATHS_TO_ROUTE_PARAMS[path];
},

Expand Down

0 comments on commit 1d4d860

Please sign in to comment.