diff options
Diffstat (limited to 'modules/context/repo.go')
-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 e335eafde3..a82535a6d4 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -78,8 +78,8 @@ func (r *Repository) CanEnableEditor() bool { // CanCommitToBranch returns true if repository is editable and user has proper access level // and branch is not protected -func (r *Repository) CanCommitToBranch() (bool, error) { - protectedBranch, err := r.Repository.IsProtectedBranch(r.BranchName) +func (r *Repository) CanCommitToBranch(doer *models.User) (bool, error) { + protectedBranch, err := r.Repository.IsProtectedBranch(r.BranchName, doer) if err != nil { return false, err } |