(ctx context.Context, groupID, projectID, roleID string, restrictResources bool, resources []database.ResourceName)
| 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) |
| 2535 | if err != nil { |
| 2536 | return err |
| 2537 | } |
| 2538 | |
| 2539 | res, err := c.getDB(ctx).ExecContext(ctx, ` |
| 2540 | UPDATE usergroups_projects_roles SET project_role_id = $3, restrict_resources = $4, resources = $5 WHERE usergroup_id = $1 AND project_id = $2 |
| 2541 | `, groupID, projectID, roleID, restrictResources, resJSON) |
| 2542 | return checkUpdateRow("project group member", res, err) |
| 2543 | } |
| 2544 | |
| 2545 | func (c *connection) DeleteProjectMemberUsergroup(ctx context.Context, groupID, projectID string) error { |
| 2546 | res, err := c.getDB(ctx).ExecContext(ctx, "DELETE FROM usergroups_projects_roles WHERE usergroup_id = $1 AND project_id = $2", groupID, projectID) |
nothing calls this directly
no test coverage detected