mirror of
https://github.com/go-gitea/gitea.git
synced 2025-11-10 09:37:50 -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:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user