(ctx context.Context, arg database.UpsertProvisionerDaemonParams)
| 8255 | } |
| 8256 | |
| 8257 | func (q *querier) UpsertProvisionerDaemon(ctx context.Context, arg database.UpsertProvisionerDaemonParams) (database.ProvisionerDaemon, error) { |
| 8258 | res := rbac.ResourceProvisionerDaemon.InOrg(arg.OrganizationID) |
| 8259 | if arg.Tags[provisionersdk.TagScope] == provisionersdk.ScopeUser { |
| 8260 | res.Owner = arg.Tags[provisionersdk.TagOwner] |
| 8261 | } |
| 8262 | if err := q.authorizeContext(ctx, policy.ActionCreate, res); err != nil { |
| 8263 | return database.ProvisionerDaemon{}, err |
| 8264 | } |
| 8265 | return q.db.UpsertProvisionerDaemon(ctx, arg) |
| 8266 | } |
| 8267 | |
| 8268 | func (q *querier) UpsertRuntimeConfig(ctx context.Context, arg database.UpsertRuntimeConfigParams) error { |
| 8269 | if err := q.authorizeContext(ctx, policy.ActionCreate, rbac.ResourceSystem); err != nil { |
nothing calls this directly
no test coverage detected