mirror of
https://github.com/writefreely/writefreely
synced 2024-11-10 19:34:19 +00:00
Respect private
setting with home page Reader
Ref T681
This commit is contained in:
parent
fda2929aed
commit
d8405680b4
1 changed files with 9 additions and 5 deletions
14
app.go
14
app.go
|
@ -193,16 +193,20 @@ func handleViewHome(app *App, w http.ResponseWriter, r *http.Request) error {
|
|||
return handleViewCollection(app, w, r)
|
||||
}
|
||||
|
||||
if app.cfg.App.Chorus {
|
||||
// This instance is focused on reading, so show Reader on home route
|
||||
return viewLocalTimeline(app, w, r)
|
||||
}
|
||||
|
||||
// Multi-user instance
|
||||
forceLanding := r.FormValue("landing") == "1"
|
||||
if !forceLanding {
|
||||
// Show correct page based on user auth status and configured landing path
|
||||
u := getUserSession(app, r)
|
||||
|
||||
if app.cfg.App.Chorus {
|
||||
// This instance is focused on reading, so show Reader on home route if not
|
||||
// private or a private-instance user is logged in.
|
||||
if !app.cfg.App.Private || u != nil {
|
||||
return viewLocalTimeline(app, w, r)
|
||||
}
|
||||
}
|
||||
|
||||
if u != nil {
|
||||
// User is logged in, so show the Pad
|
||||
return handleViewPad(app, w, r)
|
||||
|
|
Loading…
Reference in a new issue