Skip to content
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

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

Closed
ibuclaw opened this issue Mar 14, 2024 · 0 comments · Fixed by #15436
Closed

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

ibuclaw opened this issue Mar 14, 2024 · 0 comments · Fixed by #15436
Assignees
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@ibuclaw
Copy link
Contributor

ibuclaw commented Mar 14, 2024

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 %}
@ibuclaw ibuclaw added the type: bug A confirmed report of unexpected behavior in the application label Mar 14, 2024
@ibuclaw ibuclaw changed the title Module bay missing from Add Components dropdown when user doesn't have permission to Device bay. Device bay permissions affect ability to add Module bays from dropdown Mar 14, 2024
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation severity: low Does not significantly disrupt application functionality, or a workaround is available labels Apr 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants