Skip to content

Device bay permissions affect ability to add Module bays from dropdown #15435

@ibuclaw

Description

@ibuclaw

Deployment Type

Self-hosted

NetBox Version

v3.7.4

Python Version

3.11

Steps to Reproduce

  1. Add Module Bay permission to user/group
  2. Remove Device Bay permission from user/group
  3. Go to any Device
  4. Select "Add Components" drop down and note "Module Bay" is missing

Expected Behavior

Module Bay should be visible when user has Module Bay permissions.

Observed Behavior

This is caused by a typo in the if condition guard for the dropdown entry.

{% if perms.dcim.add_devicebay %}
    <li><a class="dropdown-item" href="{% url 'dcim:modulebay_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_modulebays' pk=object.pk %}">{% trans "Module Bays" %}</a></li>
{% endif %}
{% if perms.dcim.add_devicebay %}
    <li><a class="dropdown-item" href="{% url 'dcim:devicebay_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_devicebays' pk=object.pk %}">{% trans "Device Bays" %}</a></li>
{% endif %}

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions