From 090d62d7373fac10ea389fb068e96d5c5c8707b5 Mon Sep 17 00:00:00 2001 From: Yan Date: Mon, 22 Jan 2024 21:07:22 -0700 Subject: [PATCH] don't show dojos with passwords --- dojo_plugin/models/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dojo_plugin/models/__init__.py b/dojo_plugin/models/__init__.py index 5efcf69e0..36a0943cd 100644 --- a/dojo_plugin/models/__init__.py +++ b/dojo_plugin/models/__init__.py @@ -185,7 +185,7 @@ def viewable(cls, id=None, user=None): return ( (cls.from_id(id) if id is not None else cls.query) .filter(or_(cls.official, - cls.data["type"] == "public", + and_(cls.data["type"] == "public", cls.password == None), cls.dojo_id.in_(db.session.query(DojoUsers.dojo_id) .filter_by(user=user) .subquery())))