Log message #4115289

# At Username Text
# Feb 7th 2018, 12:53 eax Hey Folks - I am trying to make a custom action in CRUD in Cake3, but when I run it, all I get back is 'null'. Here's my code: https://gist.github.com/eaxexe/b81d57a63dc1727eb78347c6b5f95daa - Can anyone see anything wrong? Or know other reasons why it simply returns null? _get is run correctly, and if I check the $entities variable before it returns, it returns correct data
# Feb 7th 2018, 12:49 steinkel pass the user role to a custom finder in options and let the model handle the business logic
# Feb 7th 2018, 12:48 steinkel different functions seem like too much for me
# Feb 7th 2018, 12:48 ksc *custom finders in the table
# Feb 7th 2018, 12:47 ksc Mhh, Okay. So i think i have 2 options: i could create custom finders in the Controller and check in the index function if its a user, admin, guide, etc. and call the custom finder. And i have to authorize all roles to call the function. Or i could create different function depending on the roles, e.g. guide_index, admin_index, user_index... ? Could you tell me what is best practice with cake?
# Feb 7th 2018, 12:41 steinkel and it won't affect the contents of the query you use to display the paginated results in index
# Feb 7th 2018, 12:41 steinkel the allowed callback is used to check for authorization
# Feb 7th 2018, 12:41 steinkel in that case it would be a custom finder in your table class to filter by the user logged in
# Feb 7th 2018, 12:40 o0h Hi. I read source of Datasource, found `ConnectionInterface` is annotated with `@method lastInsertId()`. To create `Connection` class, should I implements the method? But, `Cake\Datasource\Connection` has not lastInsertId(). I feel it’s better that the method is implemented in `Driver` layer as delegating to DBO/PDO instance.
# Feb 7th 2018, 12:38 ksc Well, could i ask just one more question? Do you have any reference to simplerbac allowed functions for the index function of controllers? i just want to display just my own orders. For view, edit, delete it is clear: https://gist.github.com/anonymous/bc35bd95764a21ab990ca12fe0cb4659
# Feb 7th 2018, 12:33 neon1024 I’ve gone with an updateAll in the delete() method already, but an on delete is a good shout
# Feb 7th 2018, 12:33 neon1024 I didn’t know you had a new one until I linked the repo
# Feb 7th 2018, 12:23 ksc Ahhh well, i think i got it. Thank you very much!
# Feb 7th 2018, 12:15 admad @neon1024 for your question: just use "on delete set" for the foreign key in db.
# Feb 7th 2018, 12:10 admad @neon1024 please recommend my new social auth plugin instead of hybridauth one to people
# Feb 7th 2018, 12:09 admad @rochasmarcelo https://github.com/ADmad/cakephp-social-auth
# Feb 7th 2018, 12:03 rochasmarcelo @cleptric thanks
# Feb 7th 2018, 11:59 cleptric @rochasmarcelo https://github.com/cakephp/authentication/blob/master/docs/Authenticators.md#oauth
# Feb 7th 2018, 11:38 steinkel https://github.com/CakeDC/users/blob/master/Docs/Documentation/Extending-the-Plugin.md
# Feb 7th 2018, 11:38 steinkel yes, use $this->UserExtensions as this would be the reference to your Table class
# Feb 7th 2018, 11:35 ksc Hi, sorry i did not see your direct comment to my post. Well, do i have to use always 'UserExtensions' to loadmodel and use orm functions? i went through the docs (cakedc/users) and have real trouble to access the users table
# Feb 7th 2018, 11:25 neon1024 If anyone would like to comment if you think it could be clarified further and made less ambigous
# Feb 7th 2018, 11:25 neon1024 https://github.com/cakephp/docs/pull/5604
# Feb 7th 2018, 11:22 neon1024 So it’s field => value?
# Feb 7th 2018, 11:22 neon1024 So the fields is an array with a boolean value?!
# Feb 7th 2018, 11:22 neon1024 https://book.cakephp.org/3.0/en/orm/saving-data.html#Cake\ORM\Table::updateAll
# Feb 7th 2018, 11:22 neon1024 This simply does not fit into my brain.
# Feb 7th 2018, 11:17 neon1024 As I don’t want to delete the Catalog when the filter is deleted, because it could be associated to many Catalogs. Which would lead to a catastrophic deletion of any associated Catalog, bad times and many tickets.
# Feb 7th 2018, 11:17 neon1024 Dependent is not it. #inb4
# Feb 7th 2018, 11:16 neon1024 So that if I delete a Filter my Catalogs.filter_id is set to null. Or is that something I need to put into my `Filters::delete()` myself?
# Feb 7th 2018, 11:16 neon1024 Is there a setting in `hasMany` so that the association foreign key is updated upon the deletion?
# Feb 7th 2018, 10:42 dennis.richter021 Thanks, I will try later
# Feb 7th 2018, 10:40 rochasmarcelo @dennis.richter021 in cake 3 you could use $this->viewBuilder()->templatePath('Email/html') inside controller action
# Feb 7th 2018, 10:34 dennis.richter021 Hi, I rewrite a service for sending mails to our customers. One requested Feature is the "View in Browser"-Link on Emails. Ist there any way to show the Content of the `template/email/html` in a browser or do I have to store them somewhere else and use an external SDK?
# Feb 7th 2018, 10:08 neon1024 That might give you some pointers on how to write your Authentication adapters
# Feb 7th 2018, 10:08 neon1024 Which wraps the HybridAuth PHP library
# Feb 7th 2018, 10:08 neon1024 If you’re interested in the design, perhaps check out @admad Hybrid Auth plugin > https://github.com/ADmad/CakePHP-HybridAuth
# Feb 7th 2018, 10:08 neon1024 It’s been a while since I tried out the new auth plugin
# Feb 7th 2018, 10:07 rochasmarcelo @neon1024 hi, in this plugin I believe I have to create a new Authenticator for oauth, but I'm not sure if the Authenticators should handle redirect
# Feb 7th 2018, 10:04 neon1024 @rochasmarcelo That’s just standard OAuth flow, you can Google for that :slightly_smiling_face: Hint, You have to auth with the third party. Think about logging in with Twitter, you go to Twitter, then back to the site.
# Feb 7th 2018, 10:03 neon1024 Morning all