mirror of
https://gitee.com/gitea/gitea.git
synced 2024-12-02 19:58:23 +08:00
Backport #23384 A part of https://github.com/go-gitea/gitea/pull/22865 user/org project's `RepoID` is always 0, we need to check `OwnerID` Co-authored-by: yp05327 <576951401@qq.com>
This commit is contained in:
parent
87c31c2ffe
commit
e269e8901f
@ -193,7 +193,7 @@ func DeleteProject(ctx *context.Context) {
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if p.RepoID != ctx.Repo.Repository.ID {
|
if p.OwnerID != ctx.ContextUser.ID {
|
||||||
ctx.NotFound("", nil)
|
ctx.NotFound("", nil)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -226,7 +226,7 @@ func EditProject(ctx *context.Context) {
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if p.RepoID != ctx.Repo.Repository.ID {
|
if p.OwnerID != ctx.ContextUser.ID {
|
||||||
ctx.NotFound("", nil)
|
ctx.NotFound("", nil)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -260,7 +260,7 @@ func EditProjectPost(ctx *context.Context) {
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if p.RepoID != ctx.Repo.Repository.ID {
|
if p.OwnerID != ctx.ContextUser.ID {
|
||||||
ctx.NotFound("", nil)
|
ctx.NotFound("", nil)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user