mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-02 02:15:23 +00:00
fix change visivility of non-org does not affect forks
This commit is contained in:
parent
aff49b1c9e
commit
01dc8f8a4f
1 changed files with 5 additions and 7 deletions
|
@ -982,13 +982,11 @@ func updateRepository(e Engine, repo *Repository, visibilityChanged bool) (err e
|
|||
if err = repo.getOwner(e); err != nil {
|
||||
return fmt.Errorf("getOwner: %v", err)
|
||||
}
|
||||
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)
|
||||
if repo.Owner.IsOrganization() {
|
||||
// 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)
|
||||
|
|
Loading…
Reference in a new issue