Missing checkboxes on Cluster view page (/virtualization/clusters/<#>/) #2098
Labels
status: accepted
This issue has been accepted for implementation
type: bug
A confirmed report of unexpected behavior in the application
Issue type
[ ] Feature request
[X] Bug report
[ ] Documentation
Environment
To reproduce the issue:
Expected behavior:
When the user has the ''virtualization | cluster | Can change cluster" permission, display a checkbox in the 'Host Devices' header to select all 'Host Devices' in the list, and checkboxes next to each 'Host Device' in the list.
Error messages:
Description
I searched for an existing issue and didn't find anything matching this one. I also looked into the 'develop' or 'develop-2.4' branches and the issue doesn't appear to have been fixed there.
On the Cluster view page the list of Host devices would not display checkboxes despite the user having the ''virtualization | cluster | Can change cluster" permission. The checkboxes would only be displayed for superusers.
Fortunately there seems to be a simple fix. I noticed whenever
request.user.has_perm()
method is called elsewhere, the permissions argument followed a consistent format of<category>
.<permission>
, but the specific call in the 'get' method of the 'ClusterView' class was using the format<category>
:<permission>
, which looks like the return_url format. Simply replacing the colon with a period the permissions argument seems to have corrected the issue.In '/netbox/netbox/virtualization/views.py':
Best,
Joshua
The text was updated successfully, but these errors were encountered: