Cleanup, align with existing pattern of minimal information disclosure on insufficient permissions

This commit is contained in:
Mark Qvist 2026-09-10 11:31:18 +02:00
parent 859dc81805
commit 36a62e7b1a
No known key found for this signature in database

View file

@ -4249,7 +4249,7 @@ class ReticulumGitNode():
is_author = doc.get("meta", {}).get("author") == remote_identity.hash
admin_access = self.resolve_doc_permission(remote_identity, group_name, repository_name, doc_id, self.PERM_ADMIN)
if not is_author and not admin_access: return self.RES_DISALLOWED.to_bytes(1, "big") + b"No access, not author or admin"
if not is_author and not admin_access: return self.RES_DISALLOWED.to_bytes(1, "big") + b"Not allowed"
try:
completed_dir = os.path.join(completed_base, str(doc_id))
@ -4287,7 +4287,7 @@ class ReticulumGitNode():
is_author = doc.get("meta", {}).get("author") == remote_identity.hash
admin_access = self.resolve_doc_permission(remote_identity, group_name, repository_name, doc_id, self.PERM_ADMIN)
if not is_author and not admin_access: return self.RES_DISALLOWED.to_bytes(1, "big") + b"No access, not author or admin"
if not is_author and not admin_access: return self.RES_DISALLOWED.to_bytes(1, "big") + b"Not allowed"
try:
active_dir = os.path.join(active_base, str(doc_id))