diff --git a/server.py b/server.py index 2adc7ae25261bb566cdb5f20cf308e6fb2512979..fe92ad4430b5c19e36b6cd6a156724a6260ec463 100755 --- a/server.py +++ b/server.py @@ -212,8 +212,8 @@ def list_types(): user = current_user() types = [ protocoltype for protocoltype in ProtocolType.query.all() - if (protocoltype.public_group in user.groups - or protocoltype.private_group in user.groups + if (protocoltype.has_private_view_right(user) + or protocoltype.has_public_view_right(user) or protocoltype.is_public)] types = sorted(types, key=lambda t: t.short_name) types_table = ProtocolTypesTable(types)