-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Hide Related Objects Based On Its Permissions #15966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This may also be an improvement or change to functionality as well. Not sure it’s classified correctly, so please correct. |
Thanks for your interest in helping improve NetBox. I've triaged this feature request as actionable and moved it to the |
Feature request (FR) is appropriate since we don't currently have a separate enhancement type designation. Thanks for your openness to correction. |
@jeffgdotorg, thanks for the assistance and information. It would be best if someone else took the lead as I am not entirely sure on this, and it seems that someone who knows Netbox better would be able to do this faster. I am not sure that this would be a big fix and hope that is the case. |
To be clear, one can set the proper permissions so when the user clicks the specific Related Object, it would show an access denied message if unable to access. This request is to go a step further, as to hide these values in the UI as well |
Before I take this task up, how would the permission chekc work with only a subset of related objects are allowed? Hiding the objects based on a simple check will break this use case. |
@abhi1693 if you go to individual Sites and Regions, you’ll see a card with Related Objects on the right side. I can disable the permissions to provide an “Access Denied” to users. Rather than provide that error, why not have those options that the user lacks permissions to view, be removed. That’s the request. And it wouldn’t break the use case as the use case is to hide functionality that isn’t being used based on provided functionality. There are other ways to hide functionality and pages and such based upon permissions, so this should follow suit. |
@abhi1693 here's a visual look at what the current Related Image looks like. But since I am not using and have disabled permissions for users to view items such as Locations, Circuits, and VLANs, they shouldnt show up. Even though when clicked, the user gets a "You do not have permission to access this page." message. This request is to NOT even show them if the user lacks the permissions to view. |
There's some overlap here with #15794 FYI. |
I believe this is a duplicate of #15294. Please continue any further discussion under that thread. |
NetBox version
v3.7.7
Feature type
New functionality
Proposed functionality
Hey, just like changing the permissions can hide the Contacts page for specific sites (such as .../dcim/sites/X with X being a valid site number), this would do the same for dcim sites and dcim regions Related Objects. The goal would be to be able to hide Related Objects that arent being used based upon specific permissions. Right now, the users can click on them, but will get an error if not provided permissions. This would hide that so the users wouldnt see the options they lack permissions to.
Use case
Provide cleaner viewing and user experience for users. Plus, it would implement functionality that exist with other functionality in Netbox.
Database changes
Not sure
External dependencies
N/A I think
The text was updated successfully, but these errors were encountered: