Git Product home page Git Product logo

Comments (6)

kentonv avatar kentonv commented on June 3, 2024

Hmm, I suspect you can do DDP._CurrentInvocation.get().connection, but that is of course using a Meteor private API. Maybe we should add a Meteor.sandstormUser() server-side that calls this?

FWIW I highly recommend defining explicit methods to do mutations rather than allow/deny rules. With methods it's much easier to reason about whether the call fits the expected pattern, whether the parameter types are correct, etc. But we shouldn't be imposing that style in meteor-accounts-sandstorm.

from meteor-accounts-sandstorm.

ndarilek avatar ndarilek commented on June 3, 2024

from meteor-accounts-sandstorm.

simonv3 avatar simonv3 commented on June 3, 2024

Just wanted to pipe up that I was running into this as well and left scratching my head a bit until I came here. I'll look at the workaround.

(This is for annotate, so I'm also working with CollectionFS, though I saw @ndarilek comment somewhere that it's now depricated, sooooo)

from meteor-accounts-sandstorm.

ndarilek avatar ndarilek commented on June 3, 2024

from meteor-accounts-sandstorm.

kentonv avatar kentonv commented on June 3, 2024

If DDP._CurrentInvocation.get() doesn't work (and there's no other way to get at the connection) then I think we're out of luck. I don't know of anywhere else where we can stash the permissions. You'll need to rely on the user being logged in I guess?

from meteor-accounts-sandstorm.

simonv3 avatar simonv3 commented on June 3, 2024

DDP._CurrentInvocation.get() seemed to work fine for me in permissions, but somehow adding this package broke file uploading on CollectionFS in general. (linked to above). I'll have to investigate more later.

from meteor-accounts-sandstorm.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.