Giter Club home page Giter Club logo

Comments (7)

bezhanSalleh avatar bezhanSalleh commented on May 18, 2024 1

@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...
Screen Shot 2022-07-21 at 3 41 06 PM

@coolsam726 no need it's almost done... will be out in a day or two 😇

from filament-shield.

deniscsz avatar deniscsz commented on May 18, 2024

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.

coolsam726 avatar coolsam726 commented on May 18, 2024

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.
image
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.

bezhanSalleh avatar bezhanSalleh commented on May 18, 2024

@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.

deniscsz avatar deniscsz commented on May 18, 2024

@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.

deniscsz avatar deniscsz commented on May 18, 2024

@bezhanSalleh Ok, thanks for let me know.

from filament-shield.

coolsam726 avatar coolsam726 commented on May 18, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.