Can rules be set in Meteor.startup funcion?
jakubjafra opened this issue · 1 comments
jakubjafra commented
Hi,
Can rules be put inside Meteor.startup function, or it have to global namespace? I've got some problem with structuring my app, and I wonder if that would be OK.
Meteor.startup(function(){
Posts.permit(['insert', 'update', 'remove']).apply();
});
Thanks,
Khrone
aldeed commented
I think it should work, except that any insert/update/remove prior to server startup would not know about the rules. That said, I can't think of any way for a client to attempt insert/update/remove until the server starts up. So it seems fine.