Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asteroid Publication Security #119

Open
aadamsx opened this issue Mar 17, 2017 · 1 comment
Open

Asteroid Publication Security #119

aadamsx opened this issue Mar 17, 2017 · 1 comment

Comments

@aadamsx
Copy link

aadamsx commented Mar 17, 2017

Testing further,

I have a Meteor "Server" app ("MONGO_URL=mongodb://username:[email protected]:2222/test meteor --port 5000 run") that contains the following type services so far:

  • Publications
  • Methods

For example, here is one publication on "Server":

Meteor.publish("Names", function() {
  if (! this.userId) {
    throw new Meteor.Error('names.unauthorized',
      'This data doesn\'t belong to you.');
  }
  
  return Names.find({ userId: this.userId, limit: 1 });
});

I also have a Meteor "Admin" app ("MONGO_URL=mongodb://username:[email protected]:2222/test meteor --port 5005 run") that does admin stuff, and needs access to the Publications and Methods of the "Server" app

  • Subscribes to "Server" Publications
  • Calls out to "Server" Methods

I get Publication data from the "Server" if I don't have security applied if (! this.userId) , but if applied like above, I get nothing from the "Server" Publication.

The "Server" and "Admin" Meteor apps both talk to the same MongoDB via the URL. The "Server" & "Admin" has Meteor Accounts installed.

How can I get the this working?

@nesbtesh
Copy link

Did you ever get this working with this.userId

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants