Revert "fix: permission error when permission docname is none"

This reverts commit f1d0419fa8.

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang 2025-06-10 15:58:21 +05:30
parent ca6f47e0c3
commit 2b51d4f4d7
No known key found for this signature in database
GPG key ID: 9DCC61E211BF645F

View file

@ -361,7 +361,7 @@ def has_user_permission(doc, user=None, debug=False, *, ptype=None):
# if allowed_docs is empty it states that there is no applicable permission under the current doctype
# only check if allowed_docs is not empty
if allowed_docs and docname and str(docname) not in allowed_docs:
if allowed_docs and str(docname) not in allowed_docs:
# no user permissions for this doc specified
debug and _debug_log(
"User doesn't have access to this document because of User Permissions, allowed documents: "