{{$canReadReleases := $.Permission.CanRead $.UnitTypeReleases}} {{$canReadCode := $.Permission.CanRead $.UnitTypeCode}} {{if $canReadReleases}}
{{else if $canReadCode}} {{/* if the "repo.releases" unit is disabled, only show the "commits / branches / tags" sub menu */}} {{template "repo/sub_menu" .}} {{end}}