Branch: refs/heads/2.0.0
Home:
https://github.com/tribe29/checkmk
Commit: bbc10867444748c7dcc2cfa694a9cebbe01799c4
https://github.com/tribe29/checkmk/commit/bbc10867444748c7dcc2cfa694a9cebbe…
Author: Óscar Nájera <oscar.najera(a)tribe29.com>
Date: 2021-06-30 (Wed, 30 Jun 2021)
Changed paths:
M .werks/12871
A .werks/12991
M cmk/gui/dashboard.py
M cmk/gui/plugins/dashboard/utils.py
M cmk/gui/views.py
M cmk/gui/visuals.py
Log Message:
-----------
12991 FIX Previsualization of views/dashboard/reports by admins
Between werks 12871 and 12487 there was a feature competition. Users with
permission "Edit foreign (views/dashboards/reports)" (mostly admins) must be
able to edit and thus preview all those pages. However under normal use of
checkmk, the working user(also admin) wants to use/work with the page of highest
priority, which must be restricted to only pages that the user owns or are
published for all users.
Werk 12487 allowed admins to preview everything, but under normal operation,
views from other users would become their active working view. Werk 12871 fixed
that bringing the priority back, yet breaking the posibility to preview
everything from the editor. This werk brings both behaviors to work together.
Key distinction is that visuals.available determines visuals that are
offered to the users(own, published, builtins). Admins with edit_foreign
permission get an extra preview (_linkable) option from the edit page.
Tested behavior in Views & dashboards and is ok. Reports as well but
there are still problems with the inheritance. There is yet no
consideration in cmk.gui.visuals.available to use a user different than
the active one. Under the assumption that users don't overuse
customization in chains of inherited reports this fix works well enough.
Dashboards are consistent. From edit list, there is preview option, and
for foreign reports cloning is allowed. When viewing, the option of
"customize builtin dashboard" is only for builtin. For other user manual
cloning must take place no automatic cloning.
SUP-6459
Change-Id: I6a30593941db69b4f532ff3d21ed7cd182dfe3e8