change admin link to /admin/user

this is the page for the admin panel, if the panel is installed
then it will load, otherwise a redirect to register users has been
added in.
This commit is contained in:
Henry Oswald 2015-09-16 12:17:58 +01:00
parent 70611da833
commit 24007affa7
2 changed files with 2 additions and 1 deletions

View file

@ -168,6 +168,7 @@ module.exports = class Router
#Admin Stuff
webRouter.get '/admin', SecurityManager.requestIsAdmin, AdminController.index
webRouter.get '/admin/user', SecurityManager.requestIsAdmin, (req, res)-> res.redirect("/admin/register") #this gets removed by admin-panel addon
webRouter.get '/admin/register', SecurityManager.requestIsAdmin, AdminController.registerNewUser
webRouter.post '/admin/register', SecurityManager.requestIsAdmin, UserController.register
webRouter.post '/admin/closeEditor', SecurityManager.requestIsAdmin, AdminController.closeEditor

View file

@ -18,7 +18,7 @@ nav.navbar.navbar-default
b.caret
ul.dropdown-menu
li
a(href="/admin/register") Register New Users
a(href="/admin/user") Manage Users
each item in nav.header
if ((item.only_when_logged_in && session && session.user) || (item.only_when_logged_out && (!session || !session.user)) || (!item.only_when_logged_out && !item.only_when_logged_in))