Prevent viewing Lesion Tracker pages if user is not login

This commit is contained in:
Aysel Afsar 2016-03-27 22:40:43 -04:00
parent e2f8bf2431
commit b8c08d5f3a

View File

@ -81,3 +81,12 @@ Router.route('/viewer/timepoints/:_id', {
openNewTabWithTimepoint(timepointId);
}
});
Router.onBeforeAction(function () {
if (!Meteor.userId() && !Meteor.loggingIn()) {
this.render('entrySignIn');
this.stop();
} else {
this.next();
}
},{except: ['entrySignIn'] });