Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync media fails if remoteuser has no permission to [root] #56

Open
eduardomozart opened this issue Nov 19, 2021 · 0 comments
Open

Sync media fails if remoteuser has no permission to [root] #56

eduardomozart opened this issue Nov 19, 2021 · 0 comments

Comments

@eduardomozart
Copy link

I installed this plug-in in secondary wikis to sync the content (pages/media) from a primary wiki.
The sync works just fine for pages, but it fails for media files with the message:

transport error - HTTP status 403

It's a SSL connection and the primary wiki certificate is a valid certificate from Let's Encrypt, and the Pages were syncing normally, so I believe it was a problem related to permissions and added the remoteuser group with "read" access to [root] and the Media syncing started working normally. But I do not want that the remoteuser have read-only access to all primary wiki content, only to some pages.

So I started tweaking the admin.php source code for a bit and commited a dirty workaround to allow Media sync listing first the pages that the user has access and pulling the attachments from it. It's not fail proof, because maybe there's Media hosted on locations where there's no Page created, so it will not be synced.

I believe there's some kind of ACL protection that is generating a bug-like behavior, because when using dokuwiki.getAttachments function with no namespace, it still should be possible listing the Media attachments that user has access instead of closing the connection unexpectedly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant