You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I want to make changes to this package or if its possible to do so without changes. Is it possible to have embedded models because we are using mongo db here we can eliminate having 2 collections to perform role / permission tasks. Example Role embeds many permissions etc..
Thanks for this package, I really like it
Context
In my use case, I want to embed permissions into a role and roles into a user. In a simple form we will have something like User > roles > permissions. If you help me on this I'll be very grateful because I've been struggling to get this to work.
This will limit the need of having 2 collections which could just be embed and still perform same task
Possible implementation
I haven't really digged into your package src yet but from my understanding it would be editing the model logic for permission model to be embedded into role model eg:
class Role{
function permissions() {
$this->embedsMany('Permission');
}
}
In my use case, I want to embed Roles and Permissions into User model instead of it using have role_ids field e.g. if I was to fetch user assigned to one role I would get the following
Detailed description
Hi, I want to make changes to this package or if its possible to do so without changes. Is it possible to have embedded models because we are using mongo db here we can eliminate having 2 collections to perform role / permission tasks. Example Role embeds many permissions etc..
Thanks for this package, I really like it
Context
In my use case, I want to embed permissions into a role and roles into a user. In a simple form we will have something like User > roles > permissions. If you help me on this I'll be very grateful because I've been struggling to get this to work.
This will limit the need of having 2 collections which could just be embed and still perform same task
Possible implementation
I haven't really digged into your package src yet but from my understanding it would be editing the model logic for permission model to be embedded into role model eg:
In my use case, I want to embed Roles and Permissions into User model instead of it using have role_ids field e.g. if I was to fetch user assigned to one role I would get the following
I hope you can help me out here and if you don't understand anything i could explain further. Thanks
The text was updated successfully, but these errors were encountered: