fix: ensure document name isn't None

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Sagar Vora 2025-06-16 16:24:02 +05:30 committed by Akhil Narang
parent 60dd0377e8
commit e1f7556687
No known key found for this signature in database
GPG key ID: 9DCC61E211BF645F

View file

@ -375,7 +375,7 @@ def has_user_permission(doc, user=None, debug=False, *, ptype=None):
condition = False
break
else:
condition = str(docname) not in allowed_docs
condition = not docname or str(docname) not in allowed_docs
if condition:
# no user permissions for this doc specified