Commit 91c1ab2e authored by Stan Hu's avatar Stan Hu

Fix branch name regex not saving in /admin/push_rule page

Missing permitted param caused this field never to be saved.

Closes #3383
parent d9f96cbc
......@@ -25,7 +25,7 @@ class Admin::PushRulesController < Admin::ApplicationController
def push_rule_params
params.require(:push_rule).permit(:deny_delete_tag, :delete_branch_regex,
:commit_message_regex, :force_push_regex, :author_email_regex, :member_check,
:commit_message_regex, :branch_name_regex, :force_push_regex, :author_email_regex, :member_check,
:file_name_regex, :max_file_size, :prevent_secrets)
end
......
---
title: Fix branch name regex not saving in /admin/push_rule config
merge_request:
author:
type: fixed
......@@ -10,7 +10,7 @@ describe Admin::PushRulesController do
describe '#update' do
let(:params) do
{
deny_delete_tag: true, delete_branch_regex: "any", commit_message_regex: "any",
deny_delete_tag: true, delete_branch_regex: "any", commit_message_regex: "any", branch_name_regex: "any",
force_push_regex: "any", author_email_regex: "any", member_check: true, file_name_regex: "any",
max_file_size: "0", prevent_secrets: true
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment