Group configuration by component ownership
This commit is contained in:
parent
48a5b8a433
commit
67cc0cb802
1 changed files with 486 additions and 258 deletions
|
|
@ -168,7 +168,7 @@ handleDeleteRequest env session request = do
|
|||
([ ("root", A.toJSON (rootLabel root))
|
||||
, ("operation_id", A.toJSON (unOperationId operation))
|
||||
, ("reason", A.String "database_unavailable")
|
||||
] <> objectKeyAudit (envConfig env) (deletePath request))
|
||||
] <> objectKeyAudit (cfgProduct (envConfig env)) (deletePath request))
|
||||
throwOperationError err503
|
||||
(DeleteMutationRejected "database unavailable")
|
||||
Right value -> pure value
|
||||
|
|
@ -179,7 +179,7 @@ handleDeleteRequest env session request = do
|
|||
([ ("root", A.toJSON (rootLabel root))
|
||||
, ("operation_id", A.toJSON (unOperationId operation))
|
||||
, ("reason", A.String "object_store_unavailable")
|
||||
] <> objectKeyAudit (envConfig env) (deletePath request))
|
||||
] <> objectKeyAudit (cfgProduct (envConfig env)) (deletePath request))
|
||||
throwOperationError err409 (DeleteMutationRejected reason)
|
||||
Right value -> pure value
|
||||
liftIO $ audit "delete" (mutationAuditResult result)
|
||||
|
|
@ -187,12 +187,12 @@ handleDeleteRequest env session request = do
|
|||
([ ("root", A.toJSON (rootLabel root))
|
||||
, ("operation_id", A.toJSON (unOperationId operation))
|
||||
] <> mutationReasonFields result
|
||||
<> objectKeyAudit (envConfig env) (deletePath request))
|
||||
<> objectKeyAudit (cfgProduct (envConfig env)) (deletePath request))
|
||||
pure DeleteResponse
|
||||
{ deleteResponseOperationId = operation
|
||||
, deleteResponseResult = result
|
||||
, deleteResponseIdempotencyWindowSeconds =
|
||||
cfgIdempotencyWindowSec (envConfig env)
|
||||
cfgIdempotencyWindowSec (cfgProduct (envConfig env))
|
||||
}
|
||||
|
||||
handleDeleteBatchRequest
|
||||
|
|
@ -207,7 +207,7 @@ handleDeleteBatchRequest env session request = do
|
|||
session
|
||||
(deleteBatchCsrf request)
|
||||
let items = deleteBatchItems request
|
||||
when (null items || length items > cfgDeletePageSize (envConfig env)) $ do
|
||||
when (null items || length items > cfgDeletePageSize (cfgProduct (envConfig env))) $ do
|
||||
liftIO $ audit "delete_batch" "rejected"
|
||||
(Just (unUserId (suUserId (sessionUser session))))
|
||||
[ ("root", A.toJSON (rootLabel (deleteBatchRoot request)))
|
||||
|
|
@ -239,7 +239,7 @@ handleDeleteBatchRequest env session request = do
|
|||
(const [("reason", A.String failureReason)])
|
||||
mutationReasonFields
|
||||
outcome
|
||||
<> objectKeyAudit (envConfig env) (deleteBatchPath item))
|
||||
<> objectKeyAudit (cfgProduct (envConfig env)) (deleteBatchPath item))
|
||||
pure $ case outcome of
|
||||
Left message -> DeleteItemResponse
|
||||
{ deleteItemPath = deleteBatchPath item
|
||||
|
|
|
|||
Loading…
Reference in a new issue