aboutsummaryrefslogtreecommitdiffstats
path: root/services/repository/repository.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/repository/repository.go')
-rw-r--r--services/repository/repository.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/repository/repository.go b/services/repository/repository.go
index 98d160c223..1d390247f1 100644
--- a/services/repository/repository.go
+++ b/services/repository/repository.go
@@ -45,7 +45,7 @@ func DeleteRepository(doer *models.User, repo *models.Repository) error {
func PushCreateRepo(authUser, owner *models.User, repoName string) (*models.Repository, error) {
if !authUser.IsAdmin {
if owner.IsOrganization() {
- if ok, err := owner.CanCreateOrgRepo(authUser.ID); err != nil {
+ if ok, err := models.CanCreateOrgRepo(owner.ID, authUser.ID); err != nil {
return nil, err
} else if !ok {
return nil, fmt.Errorf("cannot push-create repository for org")