Skip to content

mgr/dashboard: "Access Denied" being shown on overview page for read-only user - #68653

Merged
afreen23 merged 1 commit into
ceph:mainfrom
rhcs-dashboard:76293-read-only-user-access-denied-for-overview-page-fix
May 6, 2026
Merged

afreen23 merged 1 commit into
ceph:mainfrom
rhcs-dashboard:76293-read-only-user-access-denied-for-overview-page-fix

Conversation

@devikab25

@devikab25 devikab25 commented Apr 28, 2026 •

Copy link
Copy Markdown
Contributor

Fix: https://tracker.ceph.com/issues/76293
Signed-off-by: Devika Babrekar [email protected]

read-only.user.overview.access.denied.mp4

Description:
Following fix helps resolve "Access Denied" error with overview component for read-only user.
For read-only user specific scenario, Prometheus service as well as daemon check is by passed for this particular fix.
Earlier, read-only user was not able to access overview component. When he clicks on Go to overview button, it did not get redirected to new overview page. This PR fixes the issue.

How to test:

  1. Create a read-only user from user management page using admin credentials.
  2. Login with newly created read-only credentials. Overview page must open without any issues.
  3. Navigate to any page which do not have read-only access rights, say user management, click on "Go to overview" button. This must open overview page without any issues.

Future approach:
A separate development must be considered to provide read access to certain services like Prometheus and Manager module after discussion.

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

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@afreen23 afreen23 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.

can you add some decription to your PR ? What you fixed ?

@github-project-automation github-project-automation Bot moved this from New to Review in progress in Ceph-Dashboard Apr 28, 2026
@@ -220,7 +220,7 @@ def map_to_system_roles(cls, roles: List[str]) -> List['Role']:
'read-only',
'allows read permission for all security scope except dashboard settings and config-opt', {
scope_name: [_P.READ] for scope_name in Scope.all_scopes()
if scope_name not in (Scope.DASHBOARD_SETTINGS, Scope.CONFIG_OPT)

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.

why this ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

To allow some extra permissions to avoid access-issues for read-only user. @nizamial09 can say more on it.

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.

I think @devikab25 this was needed because we were relying on this.prometheusService.ifPrometheusConfigured( which internally relied on some of the dashboard setting endpoint which is scoped as DASHBOARD_SETTINGS. But now that you have removed the dependency to that particular function completely, maybe we don't need it? can you recheck that? thanks

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

checking

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have added back the DASHBOARD_SETTINGS part, as @nizamial09 mentioned its not needed anymore.

@devikab25
devikab25 force-pushed the 76293-read-only-user-access-denied-for-overview-page-fix branch from d838b7a to d899dc6 Compare April 29, 2026 10:23
@devikab25
devikab25 requested a review from afreen23 April 29, 2026 10:30

@afreen23 afreen23 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.

LGTM test failures there please check

@github-project-automation github-project-automation Bot moved this from Review in progress to Reviewer approved in Ceph-Dashboard Apr 30, 2026
@devikab25
devikab25 force-pushed the 76293-read-only-user-access-denied-for-overview-page-fix branch 2 times, most recently from 8828d35 to 97df8e1 Compare April 30, 2026 13:21
@devikab25 devikab25 changed the title mgr/dashboard: "Access Denied" being shown on overview page for read-… mgr/dashboard: "Access Denied" being shown on overview page for read-only user May 4, 2026
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Review in progress in Ceph-Dashboard May 4, 2026
@devikab25
devikab25 force-pushed the 76293-read-only-user-access-denied-for-overview-page-fix branch from 97df8e1 to 8182bb0 Compare May 4, 2026 13:40
@devikab25
devikab25 requested a review from afreen23 May 4, 2026 13:42
@devikab25

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@nizamial09 nizamial09 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.

code lgtm, but left a comment to check on the python code.

@devikab25
devikab25 force-pushed the 76293-read-only-user-access-denied-for-overview-page-fix branch from 8182bb0 to 58f2aba Compare May 6, 2026 08:40
@devikab25
devikab25 requested a review from afreen23 May 6, 2026 09:03
@devikab25
devikab25 force-pushed the 76293-read-only-user-access-denied-for-overview-page-fix branch from 58f2aba to 4ebd227 Compare May 6, 2026 10:18
@github-project-automation github-project-automation Bot moved this from Review in progress to Reviewer approved in Ceph-Dashboard May 6, 2026
@afreen23
afreen23 merged commit d60eb8b into ceph:main May 6, 2026
6 checks passed
@afreen23
afreen23 deleted the 76293-read-only-user-access-denied-for-overview-page-fix branch May 6, 2026 18:51
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Done in Ceph-Dashboard May 6, 2026
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.

3 participants