diff --git a/server.py b/server.py index c1acb762a5d68aa01806c17f244030fbff0e2071..0ca5a9ab242028b26c8ef8374206e0e2686f20cc 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)