0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-11-10 12:37:37 -05:00

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 <github@albertyorban.be>
This commit is contained in:
Alberty Pascal
2025-11-09 22:23:46 +01:00
committed by GitHub
parent 050c9485df
commit c4c4cf5687

View File

@@ -897,7 +897,7 @@ func EditBranchProtection(ctx *context.APIContext) {
} else { } else {
whitelistUsers = protectBranch.WhitelistUserIDs whitelistUsers = protectBranch.WhitelistUserIDs
} }
if form.ForcePushAllowlistDeployKeys != nil { if form.ForcePushAllowlistUsernames != nil {
forcePushAllowlistUsers, err = user_model.GetUserIDsByNames(ctx, form.ForcePushAllowlistUsernames, false) forcePushAllowlistUsers, err = user_model.GetUserIDsByNames(ctx, form.ForcePushAllowlistUsernames, false)
if err != nil { if err != nil {
if user_model.IsErrUserNotExist(err) { if user_model.IsErrUserNotExist(err) {