]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/dashboard: Enable read only users to read again
authorStephan Müller <smueller@suse.com>
Wed, 3 Apr 2019 14:13:54 +0000 (16:13 +0200)
committerStephan Müller <smueller@suse.com>
Tue, 9 Apr 2019 11:25:18 +0000 (13:25 +0200)
commit35a75d088963043c77830865bc943e7d8c30f7e7
tree3f54fc95cc0e52ef2b0b149eda314e0ddac57086
parent2bde981fa9f15478b0c5e39b9797d269e3b3185e
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>
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