{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings edit")}}
{{if .Repository.IsArchived}}
{{ctx.Locale.Tr "repo.settings.archive.tagsettings_unavailable"}}
{{else}}

{{ctx.Locale.Tr "repo.settings.tags.protection"}}

{{.CsrfTokenHtml}}
{{if .Owner.IsOrganization}}
{{end}}
{{if .PageIsEditProtectedTag}} {{ctx.Locale.Tr "cancel"}} {{else}} {{end}}
{{range .ProtectedTags}} {{else}} {{end}}
{{ctx.Locale.Tr "repo.settings.tags.protection.pattern"}} {{ctx.Locale.Tr "repo.settings.tags.protection.allowed"}}
{{.NamePattern}}
{{if or .AllowlistUserIDs (and $.Owner.IsOrganization .AllowlistTeamIDs)}} {{$userIDs := .AllowlistUserIDs}} {{range $.Users}} {{if SliceUtils.Contains $userIDs .ID}} {{ctx.AvatarUtils.Avatar . 26}} {{.GetDisplayName}} {{end}} {{end}} {{if $.Owner.IsOrganization}} {{$teamIDs := .AllowlistTeamIDs}} {{range $.Teams}} {{if SliceUtils.Contains $teamIDs .ID}} {{.Name}} {{end}} {{end}} {{end}} {{else}} {{ctx.Locale.Tr "repo.settings.tags.protection.allowed.noone"}} {{end}} {{ctx.Locale.Tr "edit"}}
{{$.CsrfTokenHtml}}
{{ctx.Locale.Tr "repo.settings.tags.protection.none"}}
{{end}}
{{template "repo/settings/layout_footer" .}}