routing for admin page

This commit is contained in:
Yaman Qalieh 2016-08-16 06:15:15 -04:00
parent 0d7ea51f0e
commit 93f8b3489e

View File

@ -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"
});