feat(group): add group permissions (#10853)

# Which Problems Are Solved
Ensuring the user group resource is managed with appropriate
permissions.

# How the Problems Are Solved
By configuring and checking for the relevant permissions needed to
create, read, update, and delete the user groups resource.

# Additional Changes
N/A

# Additional Context
- Related to #9702 
- Follow-up for PRs #10455,  #10758
This commit is contained in:
Gayathri Vijayan
2025-10-21 11:18:21 +02:00
committed by GitHub
parent ff869482b1
commit ebc6c503a3
13 changed files with 1065 additions and 145 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ import (
// GetGroup returns a group that matches the group ID in the request
func (s *Server) GetGroup(ctx context.Context, req *connect.Request[group_v2.GetGroupRequest]) (*connect.Response[group_v2.GetGroupResponse], error) {
group, err := s.query.GetGroupByID(ctx, req.Msg.GetId())
group, err := s.query.GetGroupByID(ctx, req.Msg.GetId(), s.checkPermission)
if err != nil {
return nil, err
}
@@ -30,7 +30,7 @@ func (s *Server) ListGroups(ctx context.Context, req *connect.Request[group_v2.L
if err != nil {
return nil, err
}
resp, err := s.query.SearchGroups(ctx, queries)
resp, err := s.query.SearchGroups(ctx, queries, s.checkPermission)
if err != nil {
return nil, err
}