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

Need information for allowing impersonation to work with simple schema #13

Open
jowilhnson opened this issue Jul 22, 2016 · 2 comments
Open

Comments

@jowilhnson
Copy link

Getting error:
_impersonateToken is not allowed by the schema

I'm guessing this is something the package is trying to add to the Meteor.users collection document.

It would be helpful for the documentation to mention what is being added to the user document (field and type) and whether it is added top level to user or in profile or other details.

@ansaries
Copy link

I found following code in the meteor-impersonate server package:

// Reset all tokens

Meteor.startup(function() {
  var selector = { _impersonateToken: { $exists: true }};
  var modifier = { $unset: { _impersonateToken: "" }};
  var options = { multi: true };
  Meteor.users.update(selector, modifier, options);
});

Following is the type i set directly i the User schema:

_impersonateToken: {
   type: String,
   optional: true,
 },

after which it is working for me.

@guillim
Copy link

guillim commented Nov 6, 2017

+1

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

3 participants