Commit 50b19a9d authored by Administrator's avatar Administrator
Browse files

Use has_public_view_right for checking which protocols are public

parent c1a0587a
......@@ -371,10 +371,8 @@ def list_protocols():
))
protocols = [
protocol for protocol in protocol_query.all()
if (not is_logged_in and protocol.protocoltype.is_public)
or (is_logged_in and (
protocol.protocoltype.public_group in user.groups
or protocol.protocoltype.private_group in user.groups))]
if protocol.protocoltype.has_public_view_right(user)
]
def _matches_search(content):
content = content.lower()
for search_term in search_terms:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment