mirror of
https://github.com/go-gitea/gitea
synced 2025-08-29 12:58:29 +00:00
Move organization's visibility change to danger zone. (#34814)
<img width="1185" alt="image" src="https://github.com/user-attachments/assets/d48c4db2-df7c-43b3-986c-62e042190a51" /> <img width="829" alt="image" src="https://github.com/user-attachments/assets/772b8a14-6837-41f2-9d78-9f0489ef1c7d" /> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -469,7 +469,7 @@ func cleanupRepository(repoID int64) {
|
||||
}
|
||||
|
||||
func updateGitRepoAfterCreate(ctx context.Context, repo *repo_model.Repository) error {
|
||||
if err := checkDaemonExportOK(ctx, repo); err != nil {
|
||||
if err := CheckDaemonExportOK(ctx, repo); err != nil {
|
||||
return fmt.Errorf("checkDaemonExportOK: %w", err)
|
||||
}
|
||||
|
||||
|
@@ -142,7 +142,7 @@ func MakeRepoPublic(ctx context.Context, repo *repo_model.Repository) (err error
|
||||
}
|
||||
|
||||
// Create/Remove git-daemon-export-ok for git-daemon...
|
||||
if err := checkDaemonExportOK(ctx, repo); err != nil {
|
||||
if err := CheckDaemonExportOK(ctx, repo); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ func MakeRepoPrivate(ctx context.Context, repo *repo_model.Repository) (err erro
|
||||
}
|
||||
|
||||
// Create/Remove git-daemon-export-ok for git-daemon...
|
||||
if err := checkDaemonExportOK(ctx, repo); err != nil {
|
||||
if err := CheckDaemonExportOK(ctx, repo); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -243,8 +243,8 @@ func LinkedRepository(ctx context.Context, a *repo_model.Attachment) (*repo_mode
|
||||
return nil, -1, nil
|
||||
}
|
||||
|
||||
// checkDaemonExportOK creates/removes git-daemon-export-ok for git-daemon...
|
||||
func checkDaemonExportOK(ctx context.Context, repo *repo_model.Repository) error {
|
||||
// CheckDaemonExportOK creates/removes git-daemon-export-ok for git-daemon...
|
||||
func CheckDaemonExportOK(ctx context.Context, repo *repo_model.Repository) error {
|
||||
if err := repo.LoadOwner(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -314,7 +314,7 @@ func updateRepository(ctx context.Context, repo *repo_model.Repository, visibili
|
||||
}
|
||||
|
||||
// Create/Remove git-daemon-export-ok for git-daemon...
|
||||
if err := checkDaemonExportOK(ctx, repo); err != nil {
|
||||
if err := CheckDaemonExportOK(ctx, repo); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user