diff --git a/chromebook-checkout-meteor/client/router.js b/chromebook-checkout-meteor/client/router.js index f3eba60..105c9bf 100755 --- a/chromebook-checkout-meteor/client/router.js +++ b/chromebook-checkout-meteor/client/router.js @@ -24,4 +24,11 @@ Router.route('/admin', function() { } else { this.redirect('/checkout'); } +}); +Router.route('/teacher', function() { + if (Meteor.user().roles[0]==='teacher') { + this.render("teacher"); + } else { + this.redirect('/checkout'); + } }); \ No newline at end of file diff --git a/chromebook-checkout-meteor/client/teacher.html b/chromebook-checkout-meteor/client/teacher.html index 8a9f2c3..3642f2c 100644 --- a/chromebook-checkout-meteor/client/teacher.html +++ b/chromebook-checkout-meteor/client/teacher.html @@ -13,5 +13,4 @@ {{> carts }} - \ No newline at end of file