wiki icon indicating copy to clipboard operation
wiki copied to clipboard

feat: check create folder permissions

Open lucas-it opened this issue 3 years ago • 2 comments

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

lucas-it avatar Apr 25 '22 18:04 lucas-it

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.

NGPixel avatar Apr 29 '22 23:04 NGPixel

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 ?

lucas-it avatar May 01 '22 15:05 lucas-it