fix: ensure document name isn't None
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
parent
60dd0377e8
commit
e1f7556687
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue