mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-10-26 02:48:57 -04:00
Cleanup, align with existing pattern of minimal information disclosure on insufficient permissions
This commit is contained in:
parent
859dc81805
commit
36a62e7b1a
1 changed files with 2 additions and 2 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue