javascript - Meteor how to debug allow/deny -


i'm working on meteor project , started setting 1 of first more complex allow/deny rules. find quite hard see allow triggered , not , variables inside these functions contain. example:

list.allow({    update: function(userid, docs, fields, modifier) {        if(!docs.user){            console.log("list without owner => updateable everyone");            return true;        }        else if(userid === docs.user){            console.log("user owner of list => updateable!");            return true;        }        else {            console.log("no access, not owner");            return false;        }    } }); 

the console.log statements not work (nothing logged in console). i'd know docs, fields , modifier contains in moment allow-rule checked adjust code. how can debug in these methods? if not, can correct code? have collection meteor.users can have own record, should updat

use meteor debug instead of meteor run start meteor application. add node inspector package running meteor app can debug it.

also can use meteor shell in cli.

for more info josh owen's blog


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -