|
|
@ -473,10 +473,12 @@ func RegisterRoutes(m *web.Route) { |
|
|
|
m.Post("/delete", admin.DeleteRepo) |
|
|
|
m.Post("/delete", admin.DeleteRepo) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
m.Group("/packages", func() { |
|
|
|
if setting.Packages.Enabled { |
|
|
|
m.Get("", admin.Packages) |
|
|
|
m.Group("/packages", func() { |
|
|
|
m.Post("/delete", admin.DeletePackageVersion) |
|
|
|
m.Get("", admin.Packages) |
|
|
|
}) |
|
|
|
m.Post("/delete", admin.DeletePackageVersion) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
m.Group("/hooks", func() { |
|
|
|
m.Group("/hooks", func() { |
|
|
|
m.Get("", admin.DefaultOrSystemWebhooks) |
|
|
|
m.Get("", admin.DefaultOrSystemWebhooks) |
|
|
@ -670,21 +672,23 @@ func RegisterRoutes(m *web.Route) { |
|
|
|
}, reqSignIn) |
|
|
|
}, reqSignIn) |
|
|
|
|
|
|
|
|
|
|
|
m.Group("/{username}/-", func() { |
|
|
|
m.Group("/{username}/-", func() { |
|
|
|
m.Group("/packages", func() { |
|
|
|
if setting.Packages.Enabled { |
|
|
|
m.Get("", user.ListPackages) |
|
|
|
m.Group("/packages", func() { |
|
|
|
m.Group("/{type}/{name}", func() { |
|
|
|
m.Get("", user.ListPackages) |
|
|
|
m.Get("", user.RedirectToLastVersion) |
|
|
|
m.Group("/{type}/{name}", func() { |
|
|
|
m.Get("/versions", user.ListPackageVersions) |
|
|
|
m.Get("", user.RedirectToLastVersion) |
|
|
|
m.Group("/{version}", func() { |
|
|
|
m.Get("/versions", user.ListPackageVersions) |
|
|
|
m.Get("", user.ViewPackageVersion) |
|
|
|
m.Group("/{version}", func() { |
|
|
|
m.Get("/files/{fileid}", user.DownloadPackageFile) |
|
|
|
m.Get("", user.ViewPackageVersion) |
|
|
|
m.Group("/settings", func() { |
|
|
|
m.Get("/files/{fileid}", user.DownloadPackageFile) |
|
|
|
m.Get("", user.PackageSettings) |
|
|
|
m.Group("/settings", func() { |
|
|
|
m.Post("", bindIgnErr(forms.PackageSettingForm{}), user.PackageSettingsPost) |
|
|
|
m.Get("", user.PackageSettings) |
|
|
|
}, reqPackageAccess(perm.AccessModeWrite)) |
|
|
|
m.Post("", bindIgnErr(forms.PackageSettingForm{}), user.PackageSettingsPost) |
|
|
|
|
|
|
|
}, reqPackageAccess(perm.AccessModeWrite)) |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, context.PackageAssignment(), reqPackageAccess(perm.AccessModeRead)) |
|
|
|
}, context.PackageAssignment(), reqPackageAccess(perm.AccessModeRead)) |
|
|
|
} |
|
|
|
}, context_service.UserAssignmentWeb()) |
|
|
|
}, context_service.UserAssignmentWeb()) |
|
|
|
|
|
|
|
|
|
|
|
// ***** Release Attachment Download without Signin
|
|
|
|
// ***** Release Attachment Download without Signin
|
|
|
@ -973,7 +977,9 @@ func RegisterRoutes(m *web.Route) { |
|
|
|
m.Get("/milestones", reqRepoIssuesOrPullsReader, repo.Milestones) |
|
|
|
m.Get("/milestones", reqRepoIssuesOrPullsReader, repo.Milestones) |
|
|
|
}, context.RepoRef()) |
|
|
|
}, context.RepoRef()) |
|
|
|
|
|
|
|
|
|
|
|
m.Get("/packages", repo.Packages) |
|
|
|
if setting.Packages.Enabled { |
|
|
|
|
|
|
|
m.Get("/packages", repo.Packages) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
m.Group("/projects", func() { |
|
|
|
m.Group("/projects", func() { |
|
|
|
m.Get("", repo.Projects) |
|
|
|
m.Get("", repo.Projects) |
|
|
|