0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-16 15:01:07 +01:00

fix change visivility of non-org does not affect forks

This commit is contained in:
Unknwon 2015-10-08 22:38:42 -04:00
parent aff49b1c9e
commit 01dc8f8a4f

View file

@ -982,13 +982,11 @@ 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.
} if err = repo.recalculateTeamAccesses(e, 0); err != nil {
return fmt.Errorf("recalculateTeamAccesses: %v", err)
// Organization repository need to recalculate access table when visivility is changed. }
if err = repo.recalculateTeamAccesses(e, 0); err != nil {
return fmt.Errorf("recalculateTeamAccesses: %v", err)
} }
forkRepos, err := getRepositoriesByForkID(e, repo.ID) forkRepos, err := getRepositoriesByForkID(e, repo.ID)