Added a non restrictive authentication function

This commit is contained in:
mayjs 2017-05-15 18:40:45 +02:00
parent adc6a45185
commit 609a8894ec

View file

@ -17,5 +17,15 @@ Meteor.startup(() => {
};
// This will only check if the user is logged in.
// The authorization checks for the user will have to be done inside each API endpoint
Authentication.checkLoggedIn = function(userId) {
if(userId === undefined) {
const error = new Meteor.Error('Unauthorized', 'Unauthorized');
error.statusCode = 401;
throw error;
}
};
});