Skip to content

Commit

Permalink
fix(user-modify): allow user to set custom owner for UserModify
Browse files Browse the repository at this point in the history
  • Loading branch information
hamidrabedi committed Aug 10, 2024
1 parent b6020b6 commit 8e1695c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion casdoorsdk/util_modify.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ func (c *Client) modifyUserById(action string, id string, user *User, columns []
queryMap["columns"] = strings.Join(columns, ",")
}

user.Owner = c.OrganizationName
if user.Owner == "" {
user.Owner = c.OrganizationName
}
postBytes, err := json.Marshal(user)
if err != nil {
return nil, false, err
Expand Down

0 comments on commit 8e1695c

Please sign in to comment.