Hide volumes tab in instance page when user does not have permission to list volumes#8713
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8713 +/- ##
=========================================
Coverage 30.98% 30.98%
- Complexity 33497 33505 +8
=========================================
Files 5355 5355
Lines 375780 375780
Branches 54913 54913
=========================================
+ Hits 116429 116445 +16
+ Misses 243932 243905 -27
- Partials 15419 15430 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
@DaanHoogland a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
|
UI build: ✔️ |
|
tested works in qa, but note that also the whole storage tab in the main menu has disappeared: was this intended @winterhazel ? (no snapshots/backups) |
@DaanHoogland the changes in this PR do not affect the storage tab in the main menu. There are two APIs for listing volumes: |
Ok, this then is another bug, no storage page when rights to listBackups and listSnapshots do exist :( |
Regarding this situation I will create an issue, may even create a PR for this, as this should be an easy fix. |
|
@sureshanaparti are your concerns met? |
Ping @sureshanaparti |



Description
In any instance's page, the volumes tab always gets shown, even if the account does not have permission to list the instance's volumes.
This PR adds a check in the UI in order to hide the volumes tab if the current account does not have permission to use the
listVolumesAPI.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Screenshots (if appropriate):
Before, a user without permission could access the volumes tab, but the volumes would not get listed. With these changes, the volumes tab does not get shown.
How Has This Been Tested?
listVolumes;listVolumesfrom the role created in step 1;