mongodb - Autopublish removed but why can I still retrieve data from db? -


i have simple meteor/mongodb project using 'roles' package optain data db client. roles package seems work fine , browser shows right data depending on logged in, should do. when running 'meteor remove autopublish' in terminal inside applications directory 'autopublish removed' should. still can retrieve data server before(!?)

i have of db calls client/client.js.

the server/server.js nothing (i have publish/subscribe code uncomment now) , same goes common js file in main directory.

how can be? perhaps retrieving data minimongo somehow? have removed insecure if don't think matters in case(?) in advance.

edit: here's code:

client.js:

//when uncomment subscribe's should not access server/db, 'data' holds inlogg info still shows. 'movies' on other hand doesn't, shouldn't.   //meteor.subscribe('data');   //meteor.subscribe('movies');  /*############# user data ###############*/  template.userloggedin.id = function () {     return meteor.userid(); };  template.userloggedin.email = function () {    var email = meteor.users.findone({_id: meteor.userid()});    return email.emails[0].address; };  template.userloggedin.profile = function () {     var profile = meteor.users.findone({_id: meteor.userid()});    return profile.profile.name; };  template.userloggedin.role = function () {     var role = meteor.users.findone({_id: meteor.userid()});    return role.roles[0]; };  /*#############  ###############*/  template.movies.movies = function() {    var movies = movies.find().fetch();   return movies; }  server.js:  meteor.publish('data', function () {       return meteor.users.find(); });  meteor.publish('movies', function() {       return movies.find(); }); 

thanks providing code - see how confusing. users section of docs should written explicitly this, what's happening current user published. if don't write publish function users (or have subscribe commented out), should expect see current user on client. because template code looks meteor.userid(), expect still work.

assuming have other users in database, can check not being published running: meteor.users.find().count() in browser console. if returns 1 publishing current user (or 0 if logged out).


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -