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)
|
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
|
// Multi-user instance
|
||||||
forceLanding := r.FormValue("landing") == "1"
|
forceLanding := r.FormValue("landing") == "1"
|
||||||
if !forceLanding {
|
if !forceLanding {
|
||||||
// Show correct page based on user auth status and configured landing path
|
// Show correct page based on user auth status and configured landing path
|
||||||
u := getUserSession(app, r)
|
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 {
|
if u != nil {
|
||||||
// User is logged in, so show the Pad
|
// User is logged in, so show the Pad
|
||||||
return handleViewPad(app, w, r)
|
return handleViewPad(app, w, r)
|
||||||
|
|
Loading…
Add table
Reference in a new issue