Allow package linking to private repository (#19348)

* Display private repos too.

* lint

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
tokarchuk/v1.17
KN4CK3R 3 years ago committed by GitHub
parent d906858847
commit c003491cfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      routers/web/user/package.go

@ -259,7 +259,8 @@ func PackageSettings(ctx *context.Context) {
ctx.Data["PackageDescriptor"] = pd ctx.Data["PackageDescriptor"] = pd
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()

Loading…
Cancel
Save