diff --git a/app.go b/app.go index dd05c95..048c8d0 100644 --- a/app.go +++ b/app.go @@ -221,6 +221,10 @@ func handleViewHome(app *App, w http.ResponseWriter, r *http.Request) error { return handleViewPad(app, w, r) } + if app.cfg.App.Private { + return viewLogin(app, w, r) + } + if land := app.cfg.App.LandingPath(); land != "/" { return impart.HTTPError{http.StatusFound, land} } diff --git a/templates/base.tmpl b/templates/base.tmpl index 3826917..ef44121 100644 --- a/templates/base.tmpl +++ b/templates/base.tmpl @@ -48,7 +48,7 @@ {{ end }} {{if and (and .LocalTimeline .CanViewReader) (not .Chorus)}}Reader{{end}} {{if and (and (and .Chorus .OpenRegistration) (not .Username)) (or (not .Private) (ne .Landing ""))}}Sign up{{end}} - {{if not .Username}}Log in{{else if .SimpleNav}}Log out{{end}} + {{if and (not .Username) (not .Private)}}Log in{{else if .SimpleNav}}Log out{{end}} {{ end }} {{if .Chorus}}{{if .Username}}