Branch: refs/heads/2.0.0
Home:
https://github.com/tribe29/checkmk
Commit: d2ce8a31b2fc02377744551189e419959e0bb757
https://github.com/tribe29/checkmk/commit/d2ce8a31b2fc02377744551189e419959…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2021-08-11 (Wed, 11 Aug 2021)
Changed paths:
M cmk/gui/pagetypes.py
M cmk/gui/plugins/sidebar/bookmarks.py
M cmk/gui/plugins/sidebar/utils.py
M cmk/gui/sidebar.py
Log Message:
-----------
Addition to werk #12845
Custom snapins were only caring about "custom_snapin.[name]" permission
during permission checking. But in case of "not published" snapins,
there is no permission registered by the general pagetypes code.
For custom snapins we need to use the permission logic of the pagetypes
instead of checking just one permission.
To realize this the snapin class hierarchy now has new class method
`may_see`.
This method is overridden by the CustomSnapin classes to forward the
permission checking to the pagetype `is_permitted` method which in turn
realizes the correct permission checking logic.
Additionally: Cleanup of some redundant permission checking logic in
bookmarks.py.
Change-Id: Iacbbbf41f77b31c293415f04f9e56454fa171021