Merge pull request #259 from writeas/fix-edit-route-permissions
Require authenticated user on draft edit routes
This commit is contained in:
commit
f902f65365
|
@ -178,8 +178,8 @@ func InitRoutes(apper Apper, r *mux.Router) *mux.Router {
|
||||||
}
|
}
|
||||||
|
|
||||||
// All the existing stuff
|
// All the existing stuff
|
||||||
write.HandleFunc(draftEditPrefix+"/{action}/edit", handler.Web(handleViewPad, UserLevelOptional)).Methods("GET")
|
write.HandleFunc(draftEditPrefix+"/{action}/edit", handler.Web(handleViewPad, UserLevelUser)).Methods("GET")
|
||||||
write.HandleFunc(draftEditPrefix+"/{action}/meta", handler.Web(handleViewMeta, UserLevelOptional)).Methods("GET")
|
write.HandleFunc(draftEditPrefix+"/{action}/meta", handler.Web(handleViewMeta, UserLevelUser)).Methods("GET")
|
||||||
// Collections
|
// Collections
|
||||||
if apper.App().cfg.App.SingleUser {
|
if apper.App().cfg.App.SingleUser {
|
||||||
RouteCollections(handler, write.PathPrefix("/").Subrouter())
|
RouteCollections(handler, write.PathPrefix("/").Subrouter())
|
||||||
|
|
Loading…
Reference in New Issue