feat: restrict repository file browsing and commit history to authenticated users via conditional template blocks
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
{{template "base/head" .}}
|
||||
|
||||
<div role="main" aria-label="{{.Title}}" class="page-content repository file list {{if .IsBlame}}blame{{end}}">
|
||||
|
||||
{{template "repo/header" .}}
|
||||
|
||||
<div class="ui container {{if .IsBlame}}fluid padded{{end}}">
|
||||
|
||||
{{template "base/alert" .}}
|
||||
@@ -68,7 +70,8 @@
|
||||
{{ end }}
|
||||
|
||||
{{$isHomepage := (eq $n 0)}}
|
||||
<div class="repo-button-row" data-is-homepage="{{$isHomepage}}">
|
||||
|
||||
<div style="{{ if not .IsSigned }}display:none;{{ end }}" class="repo-button-row" data-is-homepage="{{$isHomepage}}">
|
||||
<div class="repo-button-row-left">
|
||||
{{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "tw-mr-1"}}
|
||||
{{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
|
||||
|
||||
Reference in New Issue
Block a user