Meteor Guide: Users and Accounts

Hi, I am new to Meteor and do it as a hobby, so please pardon my limited understanding. In the “Per-document permissions” section, the helper is defined as

if (!this.userId) {
return true;
}

Would this return true if the user is not logged in? In that case when the user is not logged in, the returned value of the helper function will evaluate to true and the lists can be edited? I am having trouble understanding this function.

That section of code is using a document helper from the dburles:collection-helpers package.

In that snippet of code. this.userId is referring to a field userId in the current document being processed - not the userId of the client making the request. So what that helper is saying is “if there’s no userId in the document (it’s not private), then anyone can edit it.”

Ok, now I see. Thanks robfallows!

1 Like

Two social media login packages are not working correctly.

For some odd reason I can’t configure them…
Whenever I click on either one of the buttons nothing happens (as seen below).
I’m assuming that that’s the way I’m supposed to configure them if not, please let me know how…

Thank you!!!

gifThingy

FWIW, I’ve written one such totally custom to use cookie sharing with Drupal 8. It’s https://atmospherejs.com/fgm/accounts-drupal and could be useful when writing a totally custom accounts system.