1
1
mirror of https://github.com/go-gitea/gitea synced 2025-11-02 12:28:25 +00:00

Merge branch 'main' into feature/bots

This commit is contained in:
Jason Song
2022-12-12 10:46:13 +08:00
committed by GitHub
119 changed files with 766 additions and 803 deletions

View File

@@ -64,7 +64,7 @@ func DeleteRepository(ctx context.Context, doer *user_model.User, repo *repo_mod
func PushCreateRepo(authUser, owner *user_model.User, repoName string) (*repo_model.Repository, error) {
if !authUser.IsAdmin {
if owner.IsOrganization() {
if ok, err := organization.CanCreateOrgRepo(owner.ID, authUser.ID); err != nil {
if ok, err := organization.CanCreateOrgRepo(db.DefaultContext, owner.ID, authUser.ID); err != nil {
return nil, err
} else if !ok {
return nil, fmt.Errorf("cannot push-create repository for org")