Created
October 25, 2014 21:36
-
-
Save ciwolsey/bf1028b30526c784cca1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Router.onBeforeAction(function () { | |
// all properties available in the route function | |
// are also available here such as this.params | |
if (!Meteor.user()) { | |
// if the user is not logged in, render the Login template | |
this.render('Login'); | |
} else { | |
// otherwise don't hold up the rest of hooks or our route/action function | |
from running | |
this.next(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment