Require authenticated user on draft edit routes

- /edit
- /meta
pull/259/head
Matt Baer 5 years ago
parent fec0eb2a0b
commit 1b8f62d143
  1. 4
      routes.go

@ -175,8 +175,8 @@ func InitRoutes(apper Apper, r *mux.Router) *mux.Router {
}
// All the existing stuff
write.HandleFunc(draftEditPrefix+"/{action}/edit", handler.Web(handleViewPad, UserLevelOptional)).Methods("GET")
write.HandleFunc(draftEditPrefix+"/{action}/meta", handler.Web(handleViewMeta, UserLevelOptional)).Methods("GET")
write.HandleFunc(draftEditPrefix+"/{action}/edit", handler.Web(handleViewPad, UserLevelUser)).Methods("GET")
write.HandleFunc(draftEditPrefix+"/{action}/meta", handler.Web(handleViewMeta, UserLevelUser)).Methods("GET")
// Collections
if apper.App().cfg.App.SingleUser {
RouteCollections(handler, write.PathPrefix("/").Subrouter())

Loading…
Cancel
Save