Skip to content

Commit 15ab040

Browse files
lalepeejreynard-code
authored andcommitted
fix run ownerId. set to current logged user
1 parent 9983041 commit 15ab040

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

run/src/main/kotlin/com/cosmotech/run/service/RunServiceImpl.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import com.cosmotech.api.rbac.PERMISSION_WRITE
1616
import com.cosmotech.api.rbac.getRunnerRolesDefinition
1717
import com.cosmotech.api.utils.constructPageRequest
1818
import com.cosmotech.api.utils.convertToMap
19+
import com.cosmotech.api.utils.getCurrentAuthenticatedUserName
1920
import com.cosmotech.run.CSM_JOB_ID_LABEL_KEY
2021
import com.cosmotech.run.RunApiServiceInterface
2122
import com.cosmotech.run.RunContainerFactory
@@ -556,7 +557,7 @@ class RunServiceImpl(
556557
val run =
557558
runRequest.copy(
558559
id = runId,
559-
ownerId = runner.ownerId,
560+
ownerId = getCurrentAuthenticatedUserName(csmPlatformProperties),
560561
organizationId = runner.organizationId,
561562
workspaceId = runner.workspaceId,
562563
runnerId = runner.id,

0 commit comments

Comments
 (0)