fix(packages): Add label for private and internal package and fix composor package source permission check (#37610) (#37643)
Backport #37610 by @lunny - Add permission checks for Composer package source links - Add private/internal visibility labels for packages, similar to repository visibility labels <img width="969" height="571" alt="image" src="https://github.com/user-attachments/assets/8a8ec3a0-bfbd-4dd6-b45b-58eda5db1a2d" /> - Add a link to change package visibility <img width="1309" height="208" alt="image" src="https://github.com/user-attachments/assets/3fa82b23-4c63-4a5e-b3f0-d37a103231ee" /> - Update link package descriptions <img width="1308" height="265" alt="image" src="https://github.com/user-attachments/assets/2c80b50e-5ffe-4d96-aedd-aa15964c4e05" /> --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Nicolas <bircni@icloud.com> Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
@@ -10,12 +10,28 @@
|
||||
{{template "user/overview/header" .}}
|
||||
{{end}}
|
||||
{{template "base/alert" .}}
|
||||
<p><a href="{{.PackageDescriptor.PackageWebLink}}">{{.PackageDescriptor.Package.Name}}</a> / <strong>{{ctx.Locale.Tr "repo.settings"}}</strong></p>
|
||||
<p>
|
||||
<a href="{{.PackageDescriptor.PackageWebLink}}">{{.PackageDescriptor.Package.Name}}</a>
|
||||
<span class="label-list">
|
||||
{{template "package/shared/visibility_badge" dict "Package" .PackageDescriptor.Package "Owner" .PackageDescriptor.Owner}}
|
||||
</span>
|
||||
/ <strong>{{ctx.Locale.Tr "repo.settings"}}</strong>
|
||||
</p>
|
||||
<h4 class="ui top attached header">
|
||||
{{ctx.Locale.Tr "packages.settings.visibility"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<p>{{ctx.Locale.Tr "packages.settings.visibility.inherit"}}</p>
|
||||
<a class="ui basic button" href="{{.ContextUser.SettingsLink}}">{{ctx.Locale.Tr "packages.settings.visibility.button"}}</a>
|
||||
</div>
|
||||
<h4 class="ui top attached header">
|
||||
{{ctx.Locale.Tr "packages.settings.link"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<p>{{ctx.Locale.Tr "packages.settings.link.description"}}</p>
|
||||
<p>- {{ctx.Locale.Tr "packages.settings.link.notice1"}}</p>
|
||||
<p>- {{ctx.Locale.Tr "packages.settings.link.notice2"}}</p>
|
||||
<p>- {{ctx.Locale.Tr "packages.settings.link.notice3"}}</p>
|
||||
<form class="ui form form-fetch-action ignore-dirty flex-text-block" action="{{.Link}}" method="post">
|
||||
<input type="hidden" name="action" value="link">
|
||||
<div data-global-init="initSearchRepoBox" class="ui search" data-uid="{{.PackageDescriptor.Owner.ID}}">
|
||||
|
||||
Reference in New Issue
Block a user