Code Monkey home page Code Monkey logo

Comments (5)

faustbrian avatar faustbrian commented on May 30, 2024

Roles and Permissions are possible to be used by accessing the pivot of the team member relationship but there is no way yet to do it directly through some methods. Documentation is on my list but I have quite a tight schedule for the next few months.

Not sure what you mean with lack of tests since they are here https://github.com/faustbrian/laravel-teams/tree/master/tests and here https://codeclimate.com/github/kodekeep/laravel-teams.

from laravel-teams.

coreyworrell avatar coreyworrell commented on May 30, 2024

I see. And by missing tests I was mainly referring to the roles and permissions, I didn’t see any tests involving those pivot fields. But like you said there aren’t any methods yet for adding/modifying them, so that makes sense. Thanks for the reply.

from laravel-teams.

faustbrian avatar faustbrian commented on May 30, 2024

I hope that I'll have some time soon to add the documentation and examples but code-wise the package is production-ready and I am using it in multiple applications.

from laravel-teams.

coreyworrell avatar coreyworrell commented on May 30, 2024

Great, thank you... Do you use another library for handling the roles/permissions? Or do you make custom interface for managing those and just hook into the query builder or something to save them?

from laravel-teams.

faustbrian avatar faustbrian commented on May 30, 2024

I usually use something like https://stitcher.io/blog/laravel-beyond-crud-03-actions to create classes like AddRoleToMember, RemoveRoleFromMember and so on to keep those behaviours isolated from the rest of the application code and easy to test. The way I use roles and permissions differs per project so I would have to think about how to add it to the package in a way that is generic enough to not have to work around it all the time.

from laravel-teams.

Related Issues (5)

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.