Created
April 17, 2014 17:44
-
-
Save ToJa92/11000615 to your computer and use it in GitHub Desktop.
An iron-router `onBeforeAction` method that renders a template if no user is logged in. It should not be used to check whether a user is logged in or not.
This file contains 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
onBeforeAction: function(pause) { | |
if(! Meteor.user()) { | |
this.render("adminLogin"); | |
pause(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment