Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Navyroot
    @Navyroot
    Thank I will try
    Mike Hughes
    @mikehhhhhhh

    Hi all, I've just taken over a Meteor project that looks to be quite insecure as no methods are authenticated.

    Is there a more elegant solution to authenticate methods than checking for this.userId in each one manually? Any kind of middleware perhaps?

    Or some kind of wrapper or way to extend method definitions so I can simply define authenticated methods in bulk?
    Jonathan
    @jonathanazulay
    You can just make simple guard functions and call them inside your methods. Thats where the logic should be anyways.
    Mike Hughes
    @mikehhhhhhh
    That's what I've done, it just feels horribly repetitive, when every method in a Meteor.methods({}) block has the same
    Sounds like it's asking for someone to forget one too!
    Jonathan
    @jonathanazulay
    Yeah well, I don’t think all kinds of repetition necessarily is bad. So you mean all of those methods have the exact same authorization rules?
    You can always forget security rules :) most of the times they are probably impossible to spot
    Mike Hughes
    @mikehhhhhhh
    Each block definition of methods generally does. There are some exceptions.
    Ha, this application I've picked up previously only had rules enforced on the front end 🙈
    Jonathan
    @jonathanazulay
    I think it sounds good to repeat it, makes it very clear what the method does and who can call it
    😄
    Mike Hughes
    @mikehhhhhhh
    You're probably right, I'm being a bit of a diva, spoilt by the tree structure of http route definitions
    Lenny Linux
    @tippexs
    Hi Folks - anybody around able to help me with a simple problem? I am running meteor 1.8 on Ubuntu18.04. I deployed for dev / testing a mongodb-container and starting the app like MONGO_URL=mongodb://root:password@localhost:27017 ROOT_URL=http://localhost PORT=3000 meteor run
    But when I open the app it seams the app is using admin-db and creating inital data from fixtures.
    Dami
    @dami_alv_twitter
    Happy new year everyone :)
    I found this to be a good resource to plan developer career. Hope it helps
    https://blog.invidelabs.com/developer-career-guide/
    Matt Campbell
    @maka-io
    @tippexs Try defining your MONGO_URL as MONGO_URL=mongodb://root:password@localhost:27017/app which will make sure you use the same database (app) every time.
    Dami
    @dami_alv_twitter
    Hey guys, I’m currently working on a project which has a lot of Session variables for showing/hide things on the views
    I’m just thinking on creating a mini-mongo collection for handling all the UI stuff
    Do you think guys this is a good approach?
    Guillaume Darbonne
    @guidouil
    @dami_alv_twitter the problem with minimongo is persistence, but there is some packages that will help you with that
    Also happy new year every one :)
    Dami
    @dami_alv_twitter
    Oh I see… :(
    Thank you @guidouil :)
    Kai
    @spik3r
    Hi Guys, relatively new to Meteor. We use Meteor-job for some things in our project. Is it appropriate to use this for long running cron like tasks that run weekly or it only meant for quick things? I've come across meteor-synced-cron but would prefer not to pull in extra libraries if I don't need to.
    Dami
    @dami_alv_twitter
    I think that both could work
    Btw, are you implementing meteor-job in your application? Or is it a separate project?
    Dami
    @dami_alv_twitter
    Just FYI, I’ve been working in a project that has meteor-synced-cron as a dependency of the main project and noticed some server overload and we’ve ended up separating both things to solve this issue
    Kai
    @spik3r
    Thanks for the quick response. My initial thought was to have it in the same project, but the more I think about it, it doesn't really belong there. Oh that's interesting, do you know why it was overloading?
    Dami
    @dami_alv_twitter
    It was because there was no split between the app itself, the admin app and those processes that I’ve mentioned before
    All the stuff running in one server lol
    Guillaume Darbonne
    @guidouil
    Who tried Meteor 1.9 ?
    Robert David
    @robertdavid010
    looking forward to it!
    Kevin Kaland
    @wizonesolutions
    One weird thing I've been running into is that our deployed app has reactivity problems on a newer route I made (it takes a few minutes for all the data to come through), but locally it's always instant. I'm not sure if the previous devs used some trick to get it all to sync down, as the same subscriptions don't show the same issue on another route that uses them. I think it's using Iron Router.
    it's not a critical route, so I haven't really debugged it, but kind of curious
    Kelly Copley
    @copleykj
    New package copleykj:grapher-link-executor for anyone using cultofcoders:grapher. It allows you to co-locate your Collections and link definitions while avoiding the issues that normally arise from doing so because of the way grapher normally works.
    Guillaume Darbonne
    @guidouil
    Meteor 1.9 is out now !
    Bart736
    @Bart736
    I would like to incorporate Konva library to the Meteor's client, unfortunately no luck, any suggestions how that can be done?
    Laurent Roger
    @lc3t35
    @Bart736 what is the problem exactly ?
    Bart736
    @Bart736
    @lc3t35 Hi, I just cannot import it in such a way for it to work. Where should it be imported and how?
    Laurent Roger
    @lc3t35
    what did you do ? meteor npm install konva
    import * as Konva from ‘konva’
    bharath529
    @bharath529
    Hi everyone, i am facing a issue with this.userId. why sometimes this.userId is returning null on server side publications?
    Bart736
    @Bart736
    @lc3t35 OK!!! Looks like the import process was successful. Now I am trying to display just a shape on the canvas, but getting this error: "Uncaught Can not find container in document with id container" - and that is although I added <div id="container"></div> to the main.html's body.
    Bart736
    @Bart736
    @lc3t35 OK, so I guess the answer is to use Meteor.startup to initialize Konva after the DOM is created (that's what I found out).
    wes
    @wscarter
    is it possible to use the mocha npm package as a driver for meteor test, or am i required to use an atmos package?
    wes
    @wscarter
    also why does full app test not show a correct web reporter when loading my app? it renders 0 pass/fail (even though there are tests defined) and then it looks like some things are obscured by my app. however, the meteor docs say "When we connect to the test instance in a browser, we want to render a testing UI rather than our app UI, so the mocha-web-reporter package will hide any UI of our application and overlay it with its own. However the app continues to behave as normal, so we are able to route around and check the correct data is loaded."
    prog20901
    @prog20901

    Need a small help on javascript

    The below code works fine in chrome. However it list all the languages but not tamil. I have installed tamil language voice but it doesn't appear in the list

    https://jsbin.com/ginanegoqu/edit?html,js,output

    how to bring it or what would be the problem?

    Also, downloaded the project https://github.com/vijethph/texttospeech-synth as zip and opened the index.html. It displays many languages but not tamil

    Guillaume Darbonne
    @guidouil
    @bharath506315 you should use Meteor.userId() inside server publication now, they try to ban the use of this