Log message #4219739

# At Username Text
# Dec 21st 2019, 19:53 luizcmarin thanks you @jimbo2150
# Dec 21st 2019, 12:20 dsar Just ask ;)
# Dec 21st 2019, 12:02 kiwi_3 I need your help to resolve a problem, can someone help me ?
# Dec 21st 2019, 12:02 kiwi_3 Hello, it's my first on IRC of CakePHP.
# Dec 21st 2019, 11:41 storkovo @kailas see the last point here https://github.com/CakeDC/users/blob/master/Docs/Documentation/Migration/4.x-5.0.md
# Dec 21st 2019, 11:36 storkovo @kailas did it worked before you switched to custom User class, or starting with that plugin yet?
# Dec 21st 2019, 05:33 kailas I’m trying to get CakeDC.Users working. I’m using a custom user class (SiteUsers) that i’ve set in users.php and have successfully used the users shell command to addSuperuser. i’ve created config/permissions.php, however, it doesn’t seem to be loading. i know this is the case since i put a die(‘asdfasdf’) in there and it doesnt run. I just get a “too many redirects”error to /profile . anyone know what i’m missing?
# Dec 21st 2019, 00:41 jimbo2150 You are thinking of AuthComponent ( https://book.cakephp.org/4/en/controllers/components/authentication.html ) which is deprecated. The authorization and authentication plugins are the way to handle account validation and permissions in 4.0.
# Dec 20th 2019, 23:27 luizcmarin no deprecated?
# Dec 20th 2019, 23:27 luizcmarin it's ok ? https://book.cakephp.org/4/en/tutorials-and-examples/cms/authentication-plugin.html
# Dec 20th 2019, 23:27 luizcmarin hi
# Dec 20th 2019, 22:34 challgren @devito from https://book.cakephp.org/3/en/controllers/middleware.html#cross-site-request-forgery-csrf-middleware
# Dec 20th 2019, 21:45 devito @adman in the router??
# Dec 20th 2019, 21:27 admad yes, use it's `whitelistCallBack()` method
# Dec 20th 2019, 20:53 devito is there an easy way to disable csrf middle ware for a particular controller or controller action?
# Dec 20th 2019, 20:48 slackebot !awesome
# Dec 20th 2019, 20:48 slackebot Command sent from Slack by latenal:
# Dec 20th 2019, 19:05 japerlman Did not know that, cool. Thanks!
# Dec 20th 2019, 19:04 dsar If you don't redirect in your action, POST will be kept in various http requests
# Dec 20th 2019, 19:04 japerlman I guess I could just do hidden form objects
# Dec 20th 2019, 19:03 japerlman will my POST data still be in $this->request->data?
# Dec 20th 2019, 19:03 japerlman I'm using the cakepdf plugin, so I think I need it on the url
# Dec 20th 2019, 18:55 dsar Or do you need it in the url?
# Dec 20th 2019, 18:53 dsar `// View` `<?= $this->Form->button(__('Download PDF'), ['name' => 'action', 'value' => 'downloadpdf']) ?>` `// Controller` `if ($this->request->getData('action') === 'downloadpdf') {` `// ...` `}`
# Dec 20th 2019, 18:51 dsar Just set a name with a value in that submit button and do the stuff in the action
# Dec 20th 2019, 18:45 japerlman I have a report that generates from POST data, I want the report to render in the view and then in the view have a button that will call the same url but with .pdf at the end of the url to download a PDF of the report. Is there a good ay to do this or should I store my values in a session variable or some other way?
# Dec 20th 2019, 17:24 felipe.marinho :,) awesome lists
# Dec 20th 2019, 17:23 dereuromark Awesome, not amazing, but yeah :P
# Dec 20th 2019, 17:22 felipe.marinho Amazing @dereuromark, just amazing. Thank you. I'll put this list in my main page lol
# Dec 20th 2019, 17:20 dereuromark @felipe.marinho Did you check this list? :) https://github.com/FriendsOfCake/awesome-cakephp#orm-and-datamapping keyword "row" i would assume
# Dec 20th 2019, 17:19 neon1024 I’m sure there are better solutions out there though for concurrency
# Dec 20th 2019, 17:19 neon1024 Then in the afterSave, I’d set it back to `null`. Sure lots of extra IO on the DB, but you’d be certain
# Dec 20th 2019, 17:18 neon1024 Then if I tried to access it again, I could check and set `$this->Flash->error('Sorry this record is being edited by ' . $user->get('username'))`
# Dec 20th 2019, 17:18 neon1024 I’d write a locked_by_id to the record when someone loaded it
# Dec 20th 2019, 17:15 felipe.marinho My friends, what is the correct way to avoid 2 users editing and overwriting the same entity?
# Dec 20th 2019, 15:42 slackebot Painful.
# Dec 20th 2019, 15:42 noel Yeah.. I think I found it – it's something weird... basically you know you get the circle icon when you're in device mode for simulating touch and drag etc... well that wasn't appearing.. just the usual arrow instead. I have to switch out of device mode and then back in again before the circle icon will appear. Once the circle icon is there then the event will trigger when I click.. if instead it's just the normal pointer then it won't.
# Dec 20th 2019, 15:41 jimbo2150 Mobile devices use touch events, `$this->Html->link('<q-icon name="visibility" />', '#', ['escape' => false, 'onclick' => 'edit(event)', 'ontouchend' => 'edit(event)'])` should work.
# Dec 20th 2019, 15:37 jotpe And the script is rendered properly in the Html Output?
# Dec 20th 2019, 15:24 slackebot ?>"; } <?php $this->Html->scriptEnd(); ```
# Dec 20th 2019, 15:24 noel Here's the link: ```$this->Html->link('<q-icon name="visibility" />', '#', ['escape' => false, 'onclick' => 'edit(event)'])``` Here's the script, which is rendered at the bottom of the template: ```<?php $this->Html->scriptStart(['block' => 'vue-component', 'type' => 'text/javascript']); ?> function edit(event) { event.stopPropagation(); window.top.location.href = "<?= Configure::read('deviceUrl').'/enquiry/'.$enquiry->id