These are chat archives for reactioncommerce/reaction

3rd
May 2016
Lukas Sägesser
@ScyDev
May 03 2016 10:26
@zenweasel A while ago you suggested I put the braintree credentials in reaction.json. Do I correctly assume that all other settings, if they don't appear in that file, will be left untouched in the DB?
Brent Hoover
@zenweasel
May 03 2016 10:34
That's correct. As long as the key is not there
Lukas Sägesser
@ScyDev
May 03 2016 11:35
Ok, tnx!
Lukas Sägesser
@ScyDev
May 03 2016 20:18
It seems to me that only users with "createProduct" role can upload Images. But I can't find where that restriction is made... can someone point me to it?
Mike Murray
@mikemurray
May 03 2016 20:27
@ScyDev do you mean, not being able to see the upload button / dropzone?
Lukas Sägesser
@ScyDev
May 03 2016 20:37
@mikemurray I've already changed that, so that a user without createProduct (a buyer, in my case) can see the dropzone and select an image. Then I get this error in JS console:
cfs_base-package.js:108 Access denied [403]defaultCallback @ cfs_base-package.js:108(anonymous function) @ cfs_collection.js:251args.(anonymous function) @ insert.js:44wrappedCallback @ collection.js:544(anonymous function) @ dynamics_browser.js:51_.extend._maybeInvokeCallback @ livedata_connection.js:391_.extend.receiveResult @ livedata_connection.js:411_.extend._livedata_result @ livedata_connection.js:1516onMessage @ livedata_connection.js:256(anonymous function) @ stream_client_sockjs.js:172_.each._.forEach @ underscore.js:105self.socket.onmessage @ stream_client_sockjs.js:171REventTarget.dispatchEvent @ sockjs-0.3.4.js:87SockJS._dispatchMessage @ sockjs-0.3.4.js:1072SockJS._didMessage @ sockjs-0.3.4.js:1130that.ws.onmessage @ sockjs-0.3.4.js:1277
Added "createProduct" to that users roles in MongoDB and then it works. Take it out again, and it doesn't work.
So storing to Media collaction must be somehow linked to that role, but I can't find it.
Mike Murray
@mikemurray
May 03 2016 20:39
so in your system, a buyer can update images, but should no be able to create product?
Lukas Sägesser
@ScyDev
May 03 2016 20:43
different use case ;) the buyer should be able to upload a profile image. the image uploader is an exact copy, and works if the user has createProduct role. but why doesn't it work without that role? where is the connection?
Mike Murray
@mikemurray
May 03 2016 20:45
think i found it, grabbing a link for you
it's defined there
Lukas Sägesser
@ScyDev
May 03 2016 20:48
Very simple! I should have found that on my own... thanks a lot!
Mike Murray
@mikemurray
May 03 2016 20:48
no problem :smile:
erendira
@erendira
May 03 2016 21:57
Hello everybody, I'm implementing a search results page for products, with several filters related with new fields I added to the product schema, I'm using a subscription, and It's supposed that every time I change the reactive var with the filters the subscription it's going to be refreshed too, but it's not happening
Had anybody tried this with success before?
Mike Murray
@mikemurray
May 03 2016 22:29
@erendira You'll need to use a Tracker
see this example in the meteor guide for making smart components: http://guide.meteor.com/blaze.html#smart-components