Allow package linking to private repository (#19348)

* Display private repos too.

* lint

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
KN4CK3R 2022-04-09 17:57:37 +02:00 committed by GitHub
parent d906858847
commit c003491cfb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -260,6 +260,7 @@ func PackageSettings(ctx *context.Context) {
repos, _, _ := models.GetUserRepositories(&models.SearchRepoOptions{ repos, _, _ := models.GetUserRepositories(&models.SearchRepoOptions{
Actor: pd.Owner, Actor: pd.Owner,
Private: true,
}) })
ctx.Data["Repos"] = repos ctx.Data["Repos"] = repos
ctx.Data["CanWritePackages"] = ctx.Package.AccessMode >= perm.AccessModeWrite || ctx.IsUserSiteAdmin() ctx.Data["CanWritePackages"] = ctx.Package.AccessMode >= perm.AccessModeWrite || ctx.IsUserSiteAdmin()