Module: check_mk
Branch: master
Commit: 616581825220718363e9d52aae842af156ab805e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=61658182522071…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 5 08:48:00 2015 +0100
Fixed permissions issues on bookmark lists
---
web/htdocs/pagetypes.py | 2 +-
web/plugins/sidebar/shipped.py | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/pagetypes.py b/web/htdocs/pagetypes.py
index d3bf5e1..86745b8 100644
--- a/web/htdocs/pagetypes.py
+++ b/web/htdocs/pagetypes.py
@@ -712,7 +712,7 @@ class Overridable:
builtin_instances.append(instance)
elif instance.is_mine():
my_instances.append(instance)
- else:
+ elif instance.is_public():
foreign_instances.append(instance)
for title, instances in [
diff --git a/web/plugins/sidebar/shipped.py b/web/plugins/sidebar/shipped.py
index d1a4d02..1d8bd5b 100644
--- a/web/plugins/sidebar/shipped.py
+++ b/web/plugins/sidebar/shipped.py
@@ -1212,7 +1212,8 @@ def get_bookmarks_by_topic():
topics = {}
BookmarkList.load()
for instance in BookmarkList.instances_sorted():
- if instance.may_see():
+ if (instance.is_mine() and instance.may_see()) or \
+ (not instance.is_mine() and instance.is_public() and instance.may_see()):
for topic, bookmarks in instance.bookmarks_by_topic():
if topic == None:
topic = instance.default_bookmark_topic()