mirror of
https://github.com/writefreely/writefreely
synced 2024-11-28 11:30:18 +00:00
Require authenticated user for editor access
Previously, anyone could access the editor even if they weren't logged in. They couldn't do much in that case (publishing would fail), but it could potentially cause some confusion. Now, users will be sent to the login page, and then redirected back to the editor once successfully logged in.
This commit is contained in:
parent
75e2b60328
commit
8e09e72979
1 changed files with 2 additions and 2 deletions
|
@ -169,9 +169,9 @@ func InitRoutes(apper Apper, r *mux.Router) *mux.Router {
|
|||
draftEditPrefix := ""
|
||||
if apper.App().cfg.App.SingleUser {
|
||||
draftEditPrefix = "/d"
|
||||
write.HandleFunc("/me/new", handler.Web(handleViewPad, UserLevelOptional)).Methods("GET")
|
||||
write.HandleFunc("/me/new", handler.Web(handleViewPad, UserLevelUser)).Methods("GET")
|
||||
} else {
|
||||
write.HandleFunc("/new", handler.Web(handleViewPad, UserLevelOptional)).Methods("GET")
|
||||
write.HandleFunc("/new", handler.Web(handleViewPad, UserLevelUser)).Methods("GET")
|
||||
}
|
||||
|
||||
// All the existing stuff
|
||||
|
|
Loading…
Reference in a new issue