This commit is contained in:
Lunny Xiao 2024-04-28 15:28:06 +08:00
parent 6844f6f43f
commit 235c9d4fd0
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 7 additions and 0 deletions

View File

@ -449,6 +449,13 @@ func UpdateIssueProject(ctx *context.Context) {
ctx.ServerError("GetProjectByID", err)
return
}
if dstProject.OwnerID != ctx.ContextUser.ID {
ctx.JSON(http.StatusUnprocessableEntity, map[string]string{
"message": fmt.Sprintf("Project[%d] is not in Owner[%d] as expected", dstProject.ID, ctx.ContextUser.ID),
})
return
}
dstDefaultColumn, err := dstProject.GetDefaultBoard(ctx)
if err != nil {
ctx.ServerError("GetDefaultBoard", err)