Skip to content

ui: fix dashboard retrievals based on permissions#9237

Merged
DaanHoogland merged 1 commit into
apache:4.19from
shapeblue:ui-dashboard-permissions
Jun 13, 2024
Merged

ui: fix dashboard retrievals based on permissions#9237
DaanHoogland merged 1 commit into
apache:4.19from
shapeblue:ui-dashboard-permissions

Conversation

@shwstppr

@shwstppr shwstppr commented Jun 13, 2024

Copy link
Copy Markdown
Contributor

Description

Fixes #9233

Retrieves and shows dashboard details if they are allowed

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

  • Created a role with some permissions denied (listKubernetesClusters, listVPCs, listEvents)

  • Created an account with the role

  • Logged in with new account to observe elements for above APIs are not shown
    image

  • Created another account with a role which has permissions for above APIs

  • Logged in with the account to observe all UI elements are shown
    image

How did you try to break this feature and the system with this change?

Fixes apache#9233

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@yadvr yadvr added this to the 4.19.1.0 milestone Jun 13, 2024

@yadvr yadvr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yadvr

yadvr commented Jun 13, 2024

Copy link
Copy Markdown
Member

@blueorangutan ui

@blueorangutan

Copy link
Copy Markdown

@rohityadavcloud a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@yadvr yadvr linked an issue Jun 13, 2024 that may be closed by this pull request
@codecov

codecov Bot commented Jun 13, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 14.96%. Comparing base (b2ef53b) to head (58a3189).
Report is 8 commits behind head on 4.19.

Additional details and impacted files
@@             Coverage Diff              @@
##               4.19    #9237      +/-   ##
============================================
- Coverage     14.96%   14.96%   -0.01%     
+ Complexity    11013    11012       -1     
============================================
  Files          5377     5377              
  Lines        469567   469603      +36     
  Branches      60162    59962     -200     
============================================
- Hits          70285    70279       -6     
- Misses       391498   391541      +43     
+ Partials       7784     7783       -1     
Flag Coverage Δ
uitests 4.29% <ø> (-0.01%) ⬇️
unittests 15.67% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@blueorangutan

Copy link
Copy Markdown

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/9237 (QA-JID-375)

@DaanHoogland DaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm and tested with some list APIs revoked:
image

@DaanHoogland
DaanHoogland merged commit 19e9020 into apache:4.19 Jun 13, 2024
@DaanHoogland
DaanHoogland deleted the ui-dashboard-permissions branch June 13, 2024 08:23
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jun 17, 2024
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Abhishek's Bugfix List
Status: No status

Development

Successfully merging this pull request may close these issues.

Dashboard items are shown even when permission set to Deny

4 participants