Created
January 15, 2015 16:44
-
-
Save czbaker/0332491dc623f6c743f3 to your computer and use it in GitHub Desktop.
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
# Global hook for requiring login, except front page and about. | |
Router.onBeforeAction -> | |
# If not logged in, tell the person they must be, otherwise continue. | |
if (!Meteor.userId()) { | |
this.render('loginRequired'); | |
} else { | |
this.next(); | |
} | |
}, { | |
except: ['home'] | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment