|
|
@ -982,14 +982,12 @@ func updateRepository(e Engine, repo *Repository, visibilityChanged bool) (err e |
|
|
|
if err = repo.getOwner(e); err != nil { |
|
|
|
if err = repo.getOwner(e); err != nil { |
|
|
|
return fmt.Errorf("getOwner: %v", err) |
|
|
|
return fmt.Errorf("getOwner: %v", err) |
|
|
|
} |
|
|
|
} |
|
|
|
if !repo.Owner.IsOrganization() { |
|
|
|
if repo.Owner.IsOrganization() { |
|
|
|
return nil |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Organization repository need to recalculate access table when visivility is changed.
|
|
|
|
// Organization repository need to recalculate access table when visivility is changed.
|
|
|
|
if err = repo.recalculateTeamAccesses(e, 0); err != nil { |
|
|
|
if err = repo.recalculateTeamAccesses(e, 0); err != nil { |
|
|
|
return fmt.Errorf("recalculateTeamAccesses: %v", err) |
|
|
|
return fmt.Errorf("recalculateTeamAccesses: %v", err) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
forkRepos, err := getRepositoriesByForkID(e, repo.ID) |
|
|
|
forkRepos, err := getRepositoriesByForkID(e, repo.ID) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|