(ctx context.Context, groupID, projectID, roleID string, restrictResources bool, resources []database.ResourceName)
| 2516 | } |
| 2517 | |
| 2518 | func (c *connection) InsertProjectMemberUsergroup(ctx context.Context, groupID, projectID, roleID string, restrictResources bool, resources []database.ResourceName) error { |
| 2519 | resJSON, err := marshalResourceNames(resources) |
| 2520 | if err != nil { |
| 2521 | return err |
| 2522 | } |
| 2523 | |
| 2524 | _, err = c.getDB(ctx).ExecContext(ctx, ` |
| 2525 | INSERT INTO usergroups_projects_roles (usergroup_id, project_id, project_role_id, restrict_resources, resources) VALUES ($1, $2, $3, $4, $5) |
| 2526 | `, groupID, projectID, roleID, restrictResources, resJSON) |
| 2527 | if err != nil { |
| 2528 | return parseErr("project group member", err) |
| 2529 | } |
| 2530 | return nil |
| 2531 | } |
| 2532 | |
| 2533 | func (c *connection) UpdateProjectMemberUsergroup(ctx context.Context, groupID, projectID, roleID string, restrictResources bool, resources []database.ResourceName) error { |
| 2534 | resJSON, err := marshalResourceNames(resources) |
nothing calls this directly
no test coverage detected