Different buttons in a list when a user is part of more than one group #7673

Closed
opened 2025-12-29 20:26:45 +01:00 by adam · 4 comments
Owner

Originally created by @sysdagenaim on GitHub (Feb 23, 2023).

NetBox version

v3.4.5

Feature type

Change to existing functionality

Proposed functionality

In a list, is it possible to have both "can view" and "can change" buttons when a user is a member of several groups and has different permissions depending on the constraints? At the moment, the buttons are all identical but some point to an error page when the user does not have the rights for the selected object.

Use case

In a list, the user would have for each line the button corresponding to his rights.
Screen Shot 2023-02-23 at 12 38 36

Database changes

No response

External dependencies

No response

Originally created by @sysdagenaim on GitHub (Feb 23, 2023). ### NetBox version v3.4.5 ### Feature type Change to existing functionality ### Proposed functionality In a list, is it possible to have both "can view" and "can change" buttons when a user is a member of several groups and has different permissions depending on the constraints? At the moment, the buttons are all identical but some point to an error page when the user does not have the rights for the selected object. ### Use case In a list, the user would have for each line the button corresponding to his rights. ![Screen Shot 2023-02-23 at 12 38 36](https://user-images.githubusercontent.com/32987896/220987456-aef4854e-acc8-48c4-b461-015537fdbcdd.png) ### Database changes _No response_ ### External dependencies _No response_
adam added the type: featurepending closurestatus: under review labels 2025-12-29 20:26:46 +01:00
adam closed this issue 2025-12-29 20:26:46 +01:00
Author
Owner

@rmanyari commented on GitHub (Feb 28, 2023):

I was able to reproduce this as following:

  • Create a dummy user, that's not member of any group
  • Create two devices called 1userver and 2userver
  • Create two permissions (see screenshot below for details) and assign it to the dummy user.
image
  • Expected behavior: When opening the devices view, only the 1userver row should have the edit button (yellow pencil).
  • Actual behavior: Both rows have the edit button, furthermore, when clicking on the edit button on 2userver, the UI sends you to an error page (see below).
image image

I can start poking around, see if we can simply condition the available options based on the permissions.

@rmanyari commented on GitHub (Feb 28, 2023): I was able to reproduce this as following: * Create a dummy user, that's not member of any group * Create two devices called 1userver and 2userver * Create two permissions (see screenshot below for details) and assign it to the dummy user. <img width="797" alt="image" src="https://user-images.githubusercontent.com/1471029/221955000-30040e07-32c5-438e-9add-24f0c9d33370.png"> * Expected behavior: When opening the devices view, only the `1userver` row should have the edit button (yellow pencil). * Actual behavior: Both rows have the edit button, furthermore, when clicking on the edit button on `2userver`, the UI sends you to an error page (see below). <img width="1175" alt="image" src="https://user-images.githubusercontent.com/1471029/221955455-c6033e5d-fefe-4eb1-8b29-7c30b6136142.png"> <img width="1026" alt="image" src="https://user-images.githubusercontent.com/1471029/221955573-e5590eb3-e00e-49ec-8c78-58336fafe284.png"> I can start poking around, see if we can simply condition the available options based on the permissions.
Author
Owner

@jeremystretch commented on GitHub (Mar 16, 2023):

It seems that additional work on the permissions backend is likely needed to facilitate this in a manner that doesn't induce a huge performance penalty.

@jeremystretch commented on GitHub (Mar 16, 2023): It seems that additional work on the permissions backend is likely needed to facilitate this in a manner that doesn't induce a huge performance penalty.
Author
Owner

@github-actions[bot] commented on GitHub (Aug 3, 2023):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Aug 3, 2023): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Sep 3, 2023):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions[bot] commented on GitHub (Sep 3, 2023): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7673