Skip to content

Incorrect Permissions in NetBox Documents Plugin for Non-Superusers #78

@TechnologieMan

Description

@TechnologieMan

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.

Image
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions