-
Notifications
You must be signed in to change notification settings - Fork 287
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
How to use the aclRule array and change pemission with respect to user in runtime? #12
Comments
You probably did not configure everything as necessary. ACL is needed only to restrict user access to files and folders. And the main directory that will be displayed is set in the disk settings. See Laravel docs - https://laravel.com/docs/5.6/filesystem , in /config/filesystems.php set your disks, and then add disks what you want to FM config (/config/file-manager.php)
|
Thank you for replying. One more thing, how I can use aclRule array in the laravel. Can you add some example in the documentation that would be very helpful? |
Example: I have disk 'images' in /config/filesystems.php for folder /public/images
This disk contain:
I add this disk to file-manager config file
|
Thanks alot. I just tried it and it worked. |
Yes, you can create your own class, for example in the folder /app/HTTP
in /config/file-manager change:
|
Hi alex, 'aclStrategy' => 'whitelist', |
Main folder too!!! Add new rule:
|
Thank you. It is working. |
->file-manager file as follow:
['public'], 'middleware' => ['web','fm-acl'], 'acl' => true, 'aclHideFromFM' => true, 'aclStrategy' => 'blacklist', 'aclRepository' => Alexusmai\LaravelFileManager\ACLService\ConfigACLRepository::class, 'aclRules' => [ 1 => [ ['disk' => 'public', 'path' => 'files/*', 'access' => 2], ], ], ];As I am setting the acl mode to true and using acl rule.
my view code is in the picture.
![screenshot from 2019-02-08 12-10-35](https://user-images.githubusercontent.com/24617277/52477655-9d911600-2b9a-11e9-8caf-853dcb88c976.png)
but when I run my application and check the file manager. The directory it shows is different then, what is set in the aclRule array, as shown below
![screenshot from 2019-02-08 12-25-55](https://user-images.githubusercontent.com/24617277/52478256-b4386c80-2b9c-11e9-81ca-0e757787e23e.png)
The text was updated successfully, but these errors were encountered: