routing for admin page
This commit is contained in:
parent
0d7ea51f0e
commit
93f8b3489e
@ -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({
|
Router.configure({
|
||||||
notFoundTemplate: "NotFound"
|
notFoundTemplate: "NotFound"
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user