Comments (6)
Hi, thank you.
I'll think about this functionality.
from laravel-file-manager.
Thanks @alexusmai i though of a work around until it gets done in Vue frontend as following:
<script>
$(document).ready(function () {
@if ( ! auth()->user()->can('manageFiles') )
//Remove unused menu items
window.fm.$store.state.fm.settings.contextMenu = [
[
{
name: 'open',
icon: 'far fa-folder-open',
},
{
name: 'audioPlay',
icon: 'fas fa-play',
},
{
name: 'videoPlay',
icon: 'fas fa-play',
},
{
name: 'view',
icon: 'fas fa-eye',
},
{
name: 'select',
icon: 'fas fa-check',
},
@if ( auth()->user()->can('downloadFiles') )
{
name: 'download',
icon: 'fas fa-download',
},
@endif
]
];
@endif
});
</script>
from laravel-file-manager.
is there any update on the ACL or Permissions?
from laravel-file-manager.
is there any update on the ACL or Permissions?
No, I have no time ...
from laravel-file-manager.
I have extended settings adding "canDownload" and "canManage" properties here that can be defined as javascript variable in you blade template, so you have full control on ACL as following:
<script>
var fmSettings = {
showFullScreen: false,
showAbout: false,
showDiskList: false,
showBreadcrumb: false,
viewType: 'grid',
showProperties: false,
showSize: true,
canDownload: {{ auth()->user()->can('downloadFiles) ? 'true' : 'false' }},
canManage: {{ auth()->user()->can('manageFiles') ? 'true' : 'false' }},
}
</script>
<script src="{{ asset('js/file-manager.js') }}"></script>
Also starting from v 2.4 we can merge those extra setting to the original settings.
@alexusmai please let me know if you are interested in a PR.
from laravel-file-manager.
Hi, thank you.
But!! I'll need to apply ACL rules only on the frontend, because my package may be using in SPA and Laravel would be only as API.
I thinked about this feature, but I'll need time for do it.
from laravel-file-manager.
Related Issues (20)
- How to add search by filename ? HOT 1
- How to sort the files by modified time of file ?
- #Laravel 10 - Your requirements could not be resolved to an installable set of packages.
- No listing directories on table selected
- Modal UI error after updating bootstrap 5.3.2 HOT 2
- Not able to find the folder details api call
- For text edit - is using CodeMirror library. Could I use visual studio code (vs code) in codeMirror Library?
- Rename folder not working for S3 HOT 1
- Package intervention/imagecache is abandoned,
- How to integrate with Laraberg?
- (FTP disk) 500 Error when creating a new folder - Directory not found
- Great work! But .... PDF open by dbl click doesn't work! HOT 1
- File extensions not showing in table view
- Modal not showing
- Not Inatalled laravel 10 HOT 1
- Upgrade to support Laravel 11 HOT 5
- downgrade to support laravel 8 framework HOT 1
- Not found error at first page
- How to paginate?
- Set root = public_path HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-file-manager.