0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-11-22 10:56:30 +01: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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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) {