[x] Add view_project permission (name: "View Project") through migration.
[x] Add needed models, and services on the backend.
[x] Add a controller for project_groups with POST /project-groups route
[x] The payload for group creation should contain name, project_id, user_ids, and permission_ids. Using this payload you will need to create an item in project_groups, then items in project_groups_to_permissions, and then in projects_to_project_groups.
[x] The key should be automatically generated in the service by turning the name into snake_case.
[x] The key should be unique for permissions and user_groups table (restriction on db level and check on the backend as well)
[x] Add validation for request payload and path parameters
What feature?
project_permissions
table (columns: id, key, name, created_at, updated_at). Limit the name to 100 chars.project_groups
table (columns: id, key, name, created_at, updated_at). Limit the name to 100 chars.projects_to_project_groups
table (columns: id, project_group_id, project_id, created_at, updated_at).project_groups_to_project_permissions
table (columns: id, project_group_id, project_permission_id, created_at, updated_at).view_project
permission (name: "View Project") through migration.POST /project-groups
routeproject_groups
, then items inproject_groups_to_permissions
, and then inprojects_to_project_groups
.Screenshots
No response