Merge pull request #245 from writeas/fix-editor-open-access

Require authenticated user for editor access
pull/191/head
Matt Baer 5 years ago committed by GitHub
commit fe26594e8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      routes.go

@ -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…
Cancel
Save