I have a problem that I do not know how to solve and I do not know how to search.
I'm building a system in php - laravel
.
This system will have user levels.
I've done all of the sign-ups, changes, user views, groups, and permissions. However, I caught on a part that probably will have to use javascript, but I have very basic knowledge in JS.
At the time of adding a user, I have a SELECT with the groups (eg ADMIN, USERS ...) and a checkbox list with the general permissions (of all groups) ... until then I can select the group and what assumptions I want.
But I needed to do the following: That when I select (eg ADMIN) in the select, JS already filled in all the permissions that ADMIN has right, and then the user could manually select whether they want any more permissions or not.
I need to do this because when I add the user, I need to know which permissions are right for each group, so I know which one to register.