(ctx context.Context, projectID, userID, roleID string, restrictResources bool, resources []database.ResourceName)
| 2561 | } |
| 2562 | |
| 2563 | func (c *connection) UpdateProjectMemberUserRole(ctx context.Context, projectID, userID, roleID string, restrictResources bool, resources []database.ResourceName) error { |
| 2564 | resJSON, err := marshalResourceNames(resources) |
| 2565 | if err != nil { |
| 2566 | return err |
| 2567 | } |
| 2568 | |
| 2569 | res, err := c.getDB(ctx).ExecContext(ctx, `UPDATE users_projects_roles SET project_role_id = $1, restrict_resources = $4, resources = $5 WHERE user_id = $2 AND project_id = $3`, roleID, userID, projectID, restrictResources, resJSON) |
| 2570 | return checkUpdateRow("project member", res, err) |
| 2571 | } |
| 2572 | |
| 2573 | // UpsertProjectMemberServiceRole inserts or updates the role of a service in a project |
| 2574 | func (c *connection) UpsertProjectMemberServiceRole(ctx context.Context, serviceID, projectID, roleID string) error { |
nothing calls this directly
no test coverage detected