Comments (7)
@coolsam726 I created a PR, take a look if you have interest to use it: #74.
My fix is different of your, I kept the permissions as generated, like projectcategory. I just change some pieces of the shield's form to make it matches. Check all works too in this case.
i will definitely review it once more. But bear in mind it's not just the composite resource names but also how resources are structured... i.e. in the demo there is Blog and Shop and they both have CategoryResource... so the draft PR also takes care of that situation as well during policy and permission generation...
@coolsam726 no need it's almost done... will be out in a day or two 😇
from filament-shield.
I was able to do a dirty fix just removing the _
from $entity
in RoleResource
to make the fields of the form match with the permissions generated in DB and Policies, but I don't think it is the right approach for the case.
Let me know if a PR using this approach is welcome and I can create one (deniscsz@0c8a72b).
from filament-shield.
I have experienced the same issue. My quick fix was to find&replace the composite name and replace it with the snake case equivalent. In my case, from projectcategory to project_category. The permissions work, but in the settings the Check All toggle input still remains off as shown below.
This would mean every time I generate permissions and policies I will have to modify my policy again. A fix to this will be highly appreciated.
from filament-shield.
@deniscsz this issue has been resolved in the draft PR #69 which also takes care of models inside directories and such plus much more...
from filament-shield.
@coolsam726 I created a PR, take a look if you have interest to use it: #74.
My fix is different of your, I kept the permissions as generated, like projectcategory. I just change some pieces of the shield's form to make it matches. Check all works too in this case.
from filament-shield.
@bezhanSalleh Ok, thanks for let me know.
from filament-shield.
@bezhanSalleh, thanks for responding to this. Could we leave the issue open until PR #69 is merged then? Or is the fix already released?
from filament-shield.
Related Issues (20)
- Autodiscover policies in other routes HOT 1
- Teams Feature HOT 7
- Add Roles And Permissions To user Resource HOT 2
- how to display a extra column in table role HOT 2
- My UserPolicy does not allow me to open my own profile HOT 2
- Feature Request: Modular support HOT 1
- Problem when using Laravel modules nwidart package HOT 1
- Multiple resources use the same model HOT 2
- Tab bug in other languages (chinese and khmer) HOT 1
- Cluster page not working
- Error on composer update HOT 2
- How to transfer RoleResource.php in Clusters? HOT 5
- Install is not finding relations HOT 7
- Role CRUD accessibility is bypassed HOT 3
- Documentation Update for Laravel 11 - Custom folder structure for Models or Third-Party Plugins HOT 1
- Role Resource is accessible for everyone HOT 7
- Svg by name "filament-shield::filament-shield.nav.role.icon" from set "default" not found. HOT 1
- Model with two words has unexpected permission name HOT 1
- Error when editing / creating roles
- super_admin role generation
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 filament-shield.