nautobot / pylint-nautobot

Custom Pylint Rules for Nautobot
https://docs.nautobot.com/projects/pylint-nautobot/en/latest/
Other
4 stars 0 forks source link

Add linter to check for correct navigation permissions #97

Open gsnider2195 opened 2 hours ago

gsnider2195 commented 2 hours ago

Environment

Proposed Functionality

Ensure that if permissions are used in NavMenu items that they match the model being used in the linked view. For example, if you are adding a navigation menu item to the plugins:example_app:examplemodel_list view, the permission should be for example_app.view_examplemodel. See the Navigation Menu docs for more information.

Use Case

glennmatthews commented 2 hours ago

Good thought, though also I'd really like to enhance the nav menu API in core at some point so that the common case can implicitly derive the correct permissions without needing so much duplication of information.