diff options
author | Jonas Franz <info@jonasfranz.software> | 2018-12-11 12:28:37 +0100 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2018-12-11 19:28:37 +0800 |
commit | 9681c8373426e8364760f033b9935b81b9276351 (patch) | |
tree | d9308c33809fdfa7859fd9a1057432a74a28c92f /modules/auth | |
parent | 64680b72bd1b0a0fc164296ff0cc7319ae7dc4ca (diff) | |
download | gitea-9681c8373426e8364760f033b9935b81b9276351.tar.gz gitea-9681c8373426e8364760f033b9935b81b9276351.zip |
Approvals at Branch Protection (#5350)
* Add branch protection for approvals
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add required approvals
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add missing comments and fmt
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add type = approval and group by reviewer_id to review
* Prevent users from adding negative review limits
* Add migration for approval whitelists
Signed-off-by: Jonas Franz <info@jonasfranz.software>
Diffstat (limited to 'modules/auth')
-rw-r--r-- | modules/auth/repo_form.go | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go index a4a00d53b4..f865061374 100644 --- a/modules/auth/repo_form.go +++ b/modules/auth/repo_form.go @@ -135,13 +135,16 @@ func (f *RepoSettingForm) Validate(ctx *macaron.Context, errs binding.Errors) bi // ProtectBranchForm form for changing protected branch settings type ProtectBranchForm struct { - Protected bool - EnableWhitelist bool - WhitelistUsers string - WhitelistTeams string - EnableMergeWhitelist bool - MergeWhitelistUsers string - MergeWhitelistTeams string + Protected bool + EnableWhitelist bool + WhitelistUsers string + WhitelistTeams string + EnableMergeWhitelist bool + MergeWhitelistUsers string + MergeWhitelistTeams string + RequiredApprovals int64 + ApprovalsWhitelistUsers string + ApprovalsWhitelistTeams string } // Validate validates the fields |