Giter Club home page Giter Club logo

Comments (11)

tmeasday avatar tmeasday commented on June 2, 2024

I think ideally there'd be a way to opt out of allow/deny and thus these methods would never be created in the first place. I've no idea of the complexity of this though -- do you have an idea @stubailo?

from guide.

stubailo avatar stubailo commented on June 2, 2024

I think it shouldn't be too hard! Would allow/deny be a separate package then? What's the optimal UX?

from guide.

tmeasday avatar tmeasday commented on June 2, 2024

How's this:

  1. There are two packages:
    • allow-deny that adds the methods, Collection.prototype.insert/update/remove on the client, Collection.prototype.allow/deny on the server.
    • insecure - which depends on the above but removes allow/deny (or whatever it does right now).
  2. A new app comes with insecure turned on (shudder).
  3. When you remove it, you have nothing, and you need to add allow-deny if you want it.
    • but maybe for a release or two we wire up Collection.prototype.allow/deny to print a warning that you need to add the allow-deny package.

The scary part is that packages can depend on allow-deny. I don't know what to do about that.

from guide.

stubailo avatar stubailo commented on June 2, 2024

The scary part is that packages can depend on allow-deny. I don't know what to do about that.

One option could be - you have to declare that you are turning on allow/deny when you initialize the colllection. That way, a package can't accidentally turn it on?

I wonder if there's a market for collection "mixins"? Because the road we are heading down includes lots of configuration and even inheritance for collections, for example to make a validated collection. If there are many packages on atmosphere that add various features to collections, for example validation, basic security, default fields, collection helpers, etc, how are they supposed to do that without overriding the prototype or inheriting?

from guide.

tmeasday avatar tmeasday commented on June 2, 2024

I think mixins make sense but maybe in a world where you inherit from mongo
collection, ala rails?

Anyway I suspect you'd want a way to turn allow/deny on for everything, at
least if consistency with the way current meteor works was desired. But
maybe that's not the case?
On Wed, 21 Oct 2015 at 5:24 PM, Sashko Stubailo [email protected]
wrote:

The scary part is that packages can depend on allow-deny. I don't know
what to do about that.

One option could be - you have to declare that you are turning on
allow/deny when you initialize the colllection. That way, a package can't
accidentally turn it on?

I wonder if there's a market for collection "mixins"? Because the road we
are heading down includes lots of configuration and even inheritance for
collections, for example to make a validated collection. If there are many
packages on atmosphere that add various features to collections, for
example validation, basic security, default fields, collection helpers,
etc, how are they supposed to do that without overriding the prototype or
inheriting?


Reply to this email directly or view it on GitHub
#47 (comment).

from guide.

tmeasday avatar tmeasday commented on June 2, 2024

I guess the methods could be defined at the point you first call allow for
a collection too..
On Wed, 21 Oct 2015 at 9:40 PM, Tom Coleman [email protected] wrote:

I think mixins make sense but maybe in a world where you inherit from
mongo collection, ala rails?

Anyway I suspect you'd want a way to turn allow/deny on for everything, at
least if consistency with the way current meteor works was desired. But
maybe that's not the case?
On Wed, 21 Oct 2015 at 5:24 PM, Sashko Stubailo [email protected]
wrote:

The scary part is that packages can depend on allow-deny. I don't know
what to do about that.

One option could be - you have to declare that you are turning on
allow/deny when you initialize the colllection. That way, a package
can't accidentally turn it on?

I wonder if there's a market for collection "mixins"? Because the road we
are heading down includes lots of configuration and even inheritance for
collections, for example to make a validated collection. If there are many
packages on atmosphere that add various features to collections, for
example validation, basic security, default fields, collection helpers,
etc, how are they supposed to do that without overriding the prototype or
inheriting?


Reply to this email directly or view it on GitHub
#47 (comment).

from guide.

stubailo avatar stubailo commented on June 2, 2024

Wow funny - there's already an issue for something similar on Meteor: meteor/meteor#5096

from guide.

tmeasday avatar tmeasday commented on June 2, 2024

That is in no way surprising ;)

from guide.

mitar avatar mitar commented on June 2, 2024

+1

from guide.

stubailo avatar stubailo commented on June 2, 2024

First step PR WIP: meteor/meteor#5559

from guide.

stubailo avatar stubailo commented on June 2, 2024

Going to close this since there is some work on Meteor, and it's not a blocker for the guide.

from guide.

Related Issues (20)

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.