Advertisement
Guest User

Untitled

a guest
Sep 1st, 2015
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. this.route('editCarousel', {
  2. path: '/editCarousel',
  3. layoutTemplate: 'loggedInTemplate',
  4. yieldTemplate: 'editCarousel',
  5. onBeforeAction: function(pause) {
  6. if (!Meteor.userId()) {
  7. Router.go('/');
  8. } else if (!Meteor.user().hasOwnProperty('profile')) {
  9. Router.go('/detailspage');
  10. } else if (Meteor.user().hasOwnProperty('profile')) {
  11. if (!Meteor.user().profile.hasOwnProperty('duedate')) {
  12. Router.go('/detailspage');
  13. }
  14. else{
  15. this.next();
  16. }
  17. } else {
  18. this.next();
  19. }
  20. }
  21. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement