Add menu-level ACS check

This commit is contained in:
Bryan Ashby 2018-08-04 11:49:44 -06:00
parent 475fe596f6
commit 5bd7ecdb88
5 changed files with 80 additions and 28 deletions

View file

@ -127,6 +127,13 @@ module.exports = class MenuStack {
} else {
self.client.log.debug( { menuName : name }, 'Goto menu module');
if(!this.client.acs.hasMenuModuleAccess(modInst)) {
if(cb) {
return cb(Errors.AccessDenied('No access to this menu'));
}
return;
}
//
// If menuFlags were supplied in menu.hjson, they should win over
// anything supplied in code.