Skip to content

Commit 7a11dfe

Browse files
committed
marshall assumed roles to JSON
1 parent 08a5c2a commit 7a11dfe

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

dbos/conductor_protocol.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,16 @@ func formatListWorkflowsResponseBody(wf WorkflowStatus) listWorkflowsConductorRe
115115
}
116116

117117
// Copy optional fields
118-
output.AuthenticatedUser = wf.AuthenticatedUser
119-
output.AssumedRole = wf.AssumedRole
120-
output.AuthenticatedRoles = wf.AuthenticatedRoles
118+
output.AuthenticatedUser = &wf.AuthenticatedUser
119+
output.AssumedRole = &wf.AssumedRole
120+
// Convert authenticated roles to JSON string if present
121+
if len(wf.AuthenticatedRoles) > 0 {
122+
rolesJSON, err := json.Marshal(wf.AuthenticatedRoles)
123+
if err == nil {
124+
rolesStr := string(rolesJSON)
125+
output.AuthenticatedRoles = &rolesStr
126+
}
127+
}
121128

122129
// Convert input/output to JSON strings if present
123130
if wf.Input != nil {

0 commit comments

Comments
 (0)