From ce70863793e10e610ec85c9442f6f237000833f1 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Tue, 11 Nov 2025 09:39:35 +0800 Subject: [PATCH] Use correct form field for allowed force push users in branch protection API (#35894) (#35908) Backport #35894 by zorrobiwan Signed-off-by: Alberty Pascal Co-authored-by: Alberty Pascal --- routers/api/v1/repo/branch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/api/v1/repo/branch.go b/routers/api/v1/repo/branch.go index 65fac45aa1..ea2b47c95c 100644 --- a/routers/api/v1/repo/branch.go +++ b/routers/api/v1/repo/branch.go @@ -897,7 +897,7 @@ func EditBranchProtection(ctx *context.APIContext) { } else { whitelistUsers = protectBranch.WhitelistUserIDs } - if form.ForcePushAllowlistDeployKeys != nil { + if form.ForcePushAllowlistUsernames != nil { forcePushAllowlistUsers, err = user_model.GetUserIDsByNames(ctx, form.ForcePushAllowlistUsernames, false) if err != nil { if user_model.IsErrUserNotExist(err) {