Skip to content

Conversation

@lucas-it
Copy link

I found an issue (I think it's an issue) recently in the asset management.
When you have the write:assets permission you can create folders anywhere you want even with page rules configured like this :
image

With my fix, when you try to create a folder which is not in the path authorized by the page rules you have this error :
image
And you can create folders when the folder path matches the page rule. In my case, you can create the folder test-asset and subfolders in it.
image

@auto-assign auto-assign bot requested a review from NGPixel April 25, 2022 18:16
@NGPixel
Copy link
Member

NGPixel commented Apr 29, 2022

One potential issue I see is if you only have write access to a specific path. You wouldn't be able to create the folders leading to that path because you don't have write access to the parent paths.

The current asset system is a bit confusing at the moment tbh, which I hope to revamp in v3.

@lucas-it
Copy link
Author

lucas-it commented May 1, 2022

One potential issue I see is if you only have write access to a specific path. You wouldn't be able to create the folders leading to that path because you don't have write access to the parent paths.

The current asset system is a bit confusing at the moment tbh, which I hope to revamp in v3.

I'm currently using Wiki.js and I need this fix. What I need to do ? Juste wait for the v3 or can I improve my code ?

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

Successfully merging this pull request may close these issues.

2 participants