]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: Enable read only users to read again 27611/head
authorStephan Müller <smueller@suse.com>
Wed, 3 Apr 2019 14:13:54 +0000 (16:13 +0200)
committerStephan Müller <smueller@suse.com>
Tue, 16 Apr 2019 15:29:27 +0000 (17:29 +0200)
commitf480de4dc24434427ec062e01e79210b68c2b475
tree0c4f9684fe672ca570f0f589ae7a58c96ba85f31
parent4b8215fbf47993d4bef91ff6e6d594e34bc6bffd
mgr/dashboard: Enable read only users to read again

The dashboards Prometheus receiver API needed to receive a POST from the
frontend, but POSTs aren't allowed by default by any read only
users. As a result the receiver API call had thrown a 403 error which
redirected the user to the 403 error page. Now you can get the last
notifications via GET. This prevents the redirection for read only
users, as a result they can get the last notifications and also
see all other allowed pages again.

Fixes: https://tracker.ceph.com/issues/39086
Signed-off-by: Stephan Müller <smueller@suse.com>
(cherry picked from commit 35a75d088963043c77830865bc943e7d8c30f7e7)
src/pybind/mgr/dashboard/controllers/prometheus.py
src/pybind/mgr/dashboard/frontend/src/app/shared/api/prometheus.service.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/prometheus.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/models/prometheus-alerts.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-notification.service.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-notification.service.ts
src/pybind/mgr/dashboard/tests/test_prometheus.py