Skip to content

mgr/dashboard: fix roles page for roles without policies #55771

Merged
nizamial09 merged 1 commit intoceph:mainfrom
rhcs-dashboard:e2e-fix
Feb 29, 2024
Merged

mgr/dashboard: fix roles page for roles without policies #55771
nizamial09 merged 1 commit intoceph:mainfrom
rhcs-dashboard:e2e-fix

Conversation

@nizamial09
Copy link
Member

@nizamial09 nizamial09 commented Feb 27, 2024

If there is no permission policies attached to a role, it fails the UI with an exception.

Also fixes another issue which I recorded below

scrnli_2_27_2024_12-45-57.PM.mp4

Fixes: https://tracker.ceph.com/issues/64588

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@nizamial09 nizamial09 requested a review from a team as a code owner February 27, 2024 07:20
@nizamial09 nizamial09 requested review from Pegonzal, afreen23 and cloudbehl and removed request for a team February 27, 2024 07:20
@nizamial09 nizamial09 changed the title mgr/dashboard: fix roles page for roles without policies mgr/dashboard: fix roles page for roles without policies Feb 27, 2024
@nizamial09
Copy link
Member Author

jenkins test dashboard

@afreen23
Copy link
Contributor

jenkins test make check

Comment on lines +846 to +848
for role in roles:
if not 'PermissionPolicies' in role:
role['PermissionPolicies'] = []
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a question , thinking on this one.
This will add permission policies to the roles when not present, that means the "PermissionPolicies" field will always be visible on UI , is that okay for UI ?

Copy link
Member Author

Choose a reason for hiding this comment

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

the default behaviour in the details tab is that even if something is empty, its good to show it to the user rather than hide it. In this case, this is an important feature for the roles. Also, the dashboard should have the ability to set policies for the roles. Something we could do in future. I don't remember if we have a tracker created for it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Alrighty then! Thanks!
Yes we have https://tracker.ceph.com/issues/64351

If there is no permission policies attached to a role, it fails the
UI with an exception.

Fixes: https://tracker.ceph.com/issues/64588
Signed-off-by: Nizamudeen A <nia@redhat.com>
@afreen23
Copy link
Contributor

jenkins test api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants