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
Authorization feature #316
Comments
Hi @tpow ! I agree that this would be a nice addition. I guess it should be in its own package. |
Hi @girardinsamuel Yes, you're right. Putting these features in a separate package would be one of the best solutions. However, since Masonite is inspired by Laravel, it is interesting to look at features like Gates and Policies https://laravel.com/docs/7.x/authorization. hellomasonite/permissionite is on hold right now because we're waiting for the new ORM 🔥 . |
I would want Authorization to be part of the framework, much like it is with Laravel. Any application that needs authentication will almost certainly need to deal with some form of authorization. Gates and Policies like Laravel seem a nice approach. Any reason that couldn't be adopted in Masonite? @nioperas06 Are you just waiting on the new ORM because you know it will require code changes? Is permissionite capable right now with Masonite 2.3? |
Oh I think it could be adopted in Masonite. @josephmancuso has enough (new ORM and other tasks) to do right now to focus on it I guess. You can try to suggest something 👍 Not the only reason. We're focusing on the Masonite Forum right now and we'll be back to permissionite after that. That's why I put the repo to private now. |
Those concepts of Gates and Policies are really great ! (I am coming from a Django background and there is some tools but no created this way). @nioperas06 when you will start working on it again, notify me, I would be glad to help ! |
What has been going on with this feature request? I would like to see a package with this, among other things, but everything seems to be so far away... now, I wanted to try out, Masonite, for its similarities with Laravel, but it's maturity tells me that it's a very very early into the game, my best bet would be to switch back to another framework, until its mature enough with all things I wanna try on. Cheers! |
With Masonite 4 coming in the game there will be more features and we will start to develop Masonite ecosystem such as this one eventually ! @josephmancuso I don't know if you planned to work on this ! Else I can develop something similar to this. I am also thinking that this feature is quite important ! |
@josephmancuso I don't have anything planned for this but this is definitely a great idea for either a feature of a package |
I have started to work on this as a feature available in M4. I am trying to follow M4 philosophy and to use Stay tuned 😉 |
Gates and policies are added in M4 |
Masonite handles authentication nicely (user identification and log in), but needs a way to authorize access (permission to do something) and define roles. Rather than having apps build their own authorization layer, it would be nice if the framework provided a basis for it.
Ideally this would be middleware that handles database model and controller access as well as various helpers for checking if users can or can't do something.
As a scenario, once this is built it would be nice to expand Masonite's blog tutorial with the addition of several user roles such as Administrator (can do anything), Editor (can change other's posts, and potentially create new ones) and Writer (can only create and edit their own posts).
The text was updated successfully, but these errors were encountered: