From c4c4cf5687ce6813996070b80ec7609a7cce26ec Mon Sep 17 00:00:00 2001 From: Alberty Pascal Date: Sun, 9 Nov 2025 22:23:46 +0100 Subject: [PATCH] Use correct form field for allowed force push users in branch protection API (#35894) Test was wrong and preventing update of force push allow users list by the API Resolves #35893 Signed-off-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 a337ed79388..b9060e9cbd0 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) {