Hide menus related to actions the user is not allowed to access
There is an issue now that menus that the user is not allowed to execute are shown.
This can be reproduced with the following steps:
- Create a database with
purchase
andpurchase_amendment
modules. - Create an user with just the "Purchase" group
- Login with this user and open the purchase menu.
- Click on the amendments menú.
Current behaviour:
- An error is raised complaining that you are not allowed to access the Purchase Amendment Models
Expected behaviour:
- The purchase amendment menu is not shown as the user is not allowed to access.
Probably this should be fixed with something similar to d41d48d68cdf but for menu instead of action keywords.