fix for plugin page access issue closes #1493

v1.18.x
barisusakli 11 years ago
parent 89225c80ca
commit f89afd92b9

@ -74,10 +74,6 @@ function miscRoutes(app, middleware, controllers) {
module.exports = function(app, middleware, controllers) {
app.all('/api/admin/*', middleware.admin.isAdmin, middleware.prepareAPI);
app.all('/admin/*', middleware.admin.isAdmin);
app.get('/admin', middleware.admin.isAdmin);
mainRoutes(app, middleware, controllers);
userRoutes(app, middleware, controllers);
forumRoutes(app, middleware, controllers);

@ -129,6 +129,10 @@ module.exports = function(app, middleware) {
app.namespace(nconf.get('relative_path'), function() {
plugins.ready(function() {
app.all('/api/*', middleware.updateLastOnlineTime, middleware.prepareAPI);
app.all('/api/admin/*', middleware.admin.isAdmin, middleware.prepareAPI);
app.all('/admin/*', middleware.admin.isAdmin);
app.get('/admin', middleware.admin.isAdmin);
plugins.fireHook('action:app.load', app, middleware, controllers);
adminRoutes(app, middleware, controllers);

Loading…
Cancel
Save