mirror of
https://github.com/kovetskiy/mark.git
synced 2026-03-19 09:07:36 +08:00
The allowedUser parameter was completely ignored; the function always restricted edits to the currently authenticated API user via GetCurrentUser(). Resolve the specified user via GetUserByName first and fall back to the current user only if that lookup fails, matching the behaviour of RestrictPageUpdatesServer which uses the parameter directly. fix: paginate GetAttachments to handle pages with >100 attachments The previous implementation fetched a single page of up to 1000 attachments. Pages with more than 1000 attachments would silently miss some, causing attachment sync to skip or re-upload them. Replace with a pagination loop (100 per page) that follows the _links.next cursor until all attachments are retrieved. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>