-
Notifications
You must be signed in to change notification settings - Fork 25
Description
I discovered that the NetBox Documents plugin does not handle permissions correctly for users who are not superusers. Specifically, object-bound documents (such as site documents) are not visible to users with the appropriate object-specific permissions.
The issue lies in the navigation.py file, where the following line is currently used:
permissions=["netbox_documents.view_document"],
This causes the plugin to check for the generic document view permission, rather than the object-specific one. As a result, users without superuser status cannot see documents even if they have the necessary permissions for a specific object.
To fix this for site documents, the line should be changed to:
permissions=["netbox_documents.view_sitedocument"],
This ensures that the permission check is correctly aligned with the object-specific document model and allows regular users with the correct permissions to access the documents as intended.
This text was originally written in German and translated into English using ChatGPT.