simonv3 / quick-survey

A tool for quick surveys, try it out. (No longer maintained).
https://apps.sandstorm.io/app/wupmzqk4872vgsye9t9x5dmrdw17mad97dk21jvcm2ph4jataze0
MIT License
116 stars 49 forks source link

sandstrom login credentials #61

Closed frankwo1 closed 7 years ago

frankwo1 commented 7 years ago

Hi - can you tell me where I set up the "fake sandstorm" login credentials if I'm running this locally on meteor - I can't seem to find out where to put this? e.g. SandstormAccounts.setTestUserInfo({ id: "12345", name: "Alice", // ... other parameters, as listed above ... }); Thanks Frank

simonv3 commented 7 years ago

In the console in your browser should work fine IIRC.

frankwo1 commented 7 years ago

Thanks - it inserts into mongo but I'm not sure how to give myself admin privileges - just not familiar enough with sandstorm - can u help with string ... SandstormAccounts.setTestUserInfo({id: "12345",name: "Alice", permissions: [name: "admin"]});

simonv3 commented 7 years ago

I think:

SandstormAccounts.setTestUserInfo({
  id: 1,
  name: "Alice",
  permissions: ['owner']
});
simonv3 commented 7 years ago

Just added some instructions to the README.md, let me know if they work:

https://github.com/simonv3/quick-survey/commit/8d701119adbb07fd44a78b2d53c722a2f682301b

frankwo1 commented 7 years ago

That works - thanks Just not enough info on sandstorm

simonv3 commented 7 years ago

That's actually on my end, the permission levels are defined by the app itself, not by sandstorm. You can see the full list here: https://github.com/simonv3/quick-survey/blob/develop/.sandstorm/sandstorm-pkgdef.capnp#L155