Monorepo for Tangled
0

Configure Feed

Select the types of activity you want to include in your feed.

appview: auth-gate repo search

Signed-off-by: Seongmin Lee <git@boltless.me>

Seongmin Lee (Jun 30, 2026, 4:31 AM +0900) 7baee08a a077dbf3

+15 -1
+10 -1
appview/pages/templates/search/search.html
··· 100 100 {{ template "codeSearchResults" . }} 101 101 {{ end }} 102 102 {{ else }} 103 - {{ template "repoSearchResults" . }} 103 + {{ if not .LoggedInUser }} 104 + <div class="flex items-center gap-2 my-2 bg-orange-50 dark:bg-orange-900/30 border border-orange-300 dark:border-orange-700 rounded px-3 py-2 text-orange-600 dark:text-orange-300 text-sm"> 105 + {{ i "circle-alert" "size-4" }} 106 + {{ $url := "/search?type=repo" -}} 107 + <span>Global repository search is temporarily disabled to unauthenticated users. 108 + <a href="/login?return_url={{ $url }}" class="underline">Login</a> to search repos.</span> 109 + </div> 110 + {{ else }} 111 + {{ template "repoSearchResults" . }} 112 + {{ end }} 104 113 {{ end }} 105 114 {{ end }} 106 115
+5
appview/state/search.go
··· 49 49 } 50 50 }() 51 51 52 + // blame me 53 + if params.BaseParams.LoggedInUser == nil { 54 + return 55 + } 56 + 52 57 var language string 53 58 if lang := cmp.Or(q.Get("language"), q.Get("lang")); lang != nil { 54 59 language = *lang