ctf0 / Laravel-Media-Manager

A "Vuejs & Laravel" Media Manager With Tons of Features
MIT License
829 stars 179 forks source link

Restrict access but still allow creation of directories within restricted directory? #63

Closed TheDutchDev closed 5 years ago

TheDutchDev commented 5 years ago

Hi,

I've got a user application, each user has a specific folder (/users/username) in which they can store images etc. I want to use the folders as albums to display on other pages, but when I restrict access to the specific user's folder I can't create any folders anymore.

I used the code on this page to restrict access: https://github.com/ctf0/Laravel-Media-Manager/wiki/Restrict-Access-To-Path

Is it possible to restrict access and still allow the creation of directories/folders within the restricted folder?

Thanks! Niels

ctf0 commented 5 years ago

the reason behind the folder creation is disabled is the navigation in&out of the folders which will produce a side effect.

TheDutchDev commented 5 years ago

So, is there any way to get it done without side effects?

ctf0 commented 5 years ago

currently i have no idea how, because it means the folders array will be populated which means when u try to go out of the folder you will get an error because the app doesnt know the full folders path

TheDutchDev commented 5 years ago

Ohh I see, hmm I might have a different fix though.

Might just add a seperate application where one can create albums(which will create folders in the back-end) and when opening that album, it will open the media manager and restrict access to that specific folder assigned to the album the user clicked on.

ctf0 commented 5 years ago

this would work