diff --git a/hourglass/lib/router.js b/hourglass/lib/router.js index 218a7d1..b10d61a 100644 --- a/hourglass/lib/router.js +++ b/hourglass/lib/router.js @@ -24,6 +24,14 @@ Router.route('/profile', function() { } }); +Router.route('/admin', function() { + if (Roles.userIsInRole(Meteor.userId(), ['admin', 'superadmin'])) { + this.render("admin"); + } else { + this.redirect('/login'); + } +}); + Router.configure({ notFoundTemplate: "NotFound" });