Skip to content

Commit

Permalink
#1363 Missing rights for the AV workflow node executor
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoraboeuf committed Nov 30, 2024
1 parent ceb3208 commit 1c2c31a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import net.nemerosa.ontrack.model.events.Event
import net.nemerosa.ontrack.model.events.EventTemplatingService
import net.nemerosa.ontrack.model.events.PlainEventRenderer
import net.nemerosa.ontrack.model.events.SerializableEventService
import net.nemerosa.ontrack.model.security.SecurityService
import net.nemerosa.ontrack.model.structure.Branch
import net.nemerosa.ontrack.model.structure.Build
import net.nemerosa.ontrack.model.structure.ProjectEntityType
Expand All @@ -27,6 +28,7 @@ class AutoVersioningWorkflowNodeExecutor(
extensionFeature: AutoVersioningExtensionFeature,
private val autoVersioningProcessingService: AutoVersioningProcessingService,
private val structureService: StructureService,
private val securityService: SecurityService,
private val eventTemplatingService: EventTemplatingService,
private val serializableEventService: SerializableEventService,
private val autoVersioningAuditService: AutoVersioningAuditService,
Expand All @@ -42,7 +44,9 @@ class AutoVersioningWorkflowNodeExecutor(
data: AutoVersioningWorkflowNodeExecutorData,
workflowNodeExecutorResultFeedback: (output: JsonNode?) -> Unit
): WorkflowNodeExecutorResult {
val order = createOrder(workflowInstance, data)
val order = securityService.asAdmin {
createOrder(workflowInstance, data)
}
val output = AutoVersioningWorkflowNodeExecutorOutput(
autoVersioningOrderId = order.uuid,
)
Expand Down

0 comments on commit 1c2c31a

Please sign in to comment.