Branch: refs/heads/master
Home:
https://github.com/tribe29/checkmk
Commit: a9cd24c6997e962f01fb60c2828c12ea49782749
https://github.com/tribe29/checkmk/commit/a9cd24c6997e962f01fb60c2828c12ea4…
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