diff options
author | SagePtr <sageptr@gmail.com> | 2018-08-08 05:17:11 +0200 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2018-08-08 11:17:10 +0800 |
commit | 32145b6de822c5e56424438902b70e1290310bba (patch) | |
tree | daff3ecd8aa6f99b276a4433ad66dcd7d05a12ad /modules/context | |
parent | 67a868853880c08bd4a6a6eca470bb4c475446da (diff) | |
download | gitea-32145b6de822c5e56424438902b70e1290310bba.tar.gz gitea-32145b6de822c5e56424438902b70e1290310bba.zip |
Push whitelist now doesn't apply to branch deletion (#4601) (#4607)
Diffstat (limited to 'modules/context')
-rw-r--r-- | modules/context/repo.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go index 7239b353ff..17a319ecc0 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -85,9 +85,9 @@ func (r *Repository) CanCreateBranch() bool { } // CanCommitToBranch returns true if repository is editable and user has proper access level -// and branch is not protected +// and branch is not protected for push func (r *Repository) CanCommitToBranch(doer *models.User) (bool, error) { - protectedBranch, err := r.Repository.IsProtectedBranch(r.BranchName, doer) + protectedBranch, err := r.Repository.IsProtectedBranchForPush(r.BranchName, doer) if err != nil { return false, err } |