From 7a0347315995b25bcb2dca4786504fb699b5f004 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 19 Nov 2021 19:41:40 +0800 Subject: Use a standalone struct name for Organization (#17632) * Use a standalone struct name for Organization * recover unnecessary change * make the code readable * Fix template failure * Fix template failure * Move HasMemberWithUserID to org * Fix test * Remove unnecessary user type check * Fix test Co-authored-by: wxiaoguang --- routers/web/repo/pull.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routers/web/repo/pull.go') diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go index 4337278214..d5aa480d1f 100644 --- a/routers/web/repo/pull.go +++ b/routers/web/repo/pull.go @@ -217,7 +217,7 @@ func ForkPost(ctx *context.Context) { // Check ownership of organization. if ctxUser.IsOrganization() { - isOwner, err := ctxUser.IsOwnedBy(ctx.User.ID) + isOwner, err := models.OrgFromUser(ctxUser).IsOwnedBy(ctx.User.ID) if err != nil { ctx.ServerError("IsOwnedBy", err) return -- cgit v1.2.3