Log message #4193811

# At Username Text
# Jul 18th 2019, 08:44 felix.robaglia I thought I could do something like this, but I don't have access to Auth in Entity/User.php. Any ideas how I could accomplish this ?
# Jul 18th 2019, 08:26 felix.robaglia I meant User entity.
# Jul 18th 2019, 08:26 felix.robaglia I think I found a way using _setRole in UsersTable. Thanks :slightly_smiling_face:
# Jul 18th 2019, 08:14 challgren if ($user->isAdmin) { $role = “html for input type”; }
# Jul 18th 2019, 08:13 felix.robaglia Cause even though they shouldn't be able to, i'm always scared they add a input manually to the dom connected to role and change it to become admin
# Jul 18th 2019, 08:13 felix.robaglia Hello, what is the easiest way to tell Cake : 'Users that aren't 'admin' can't modify the 'role' column" ?
# Jul 18th 2019, 08:12 dereuromark The delete ajax thingie worked quite well for now to roll out on all paginated tables.
# Jul 18th 2019, 08:12 dereuromark I think in 3.x/4.x it should be rather easy to generate some more generic tooling that easily injects itself here, or provides some skeleton around these tasks. too much manual is not DRY IMO^^
# Jul 18th 2019, 08:09 challgren As for AJAX, autocomplete, edit in place I kind of do that manually and dont depend on a plugin
# Jul 18th 2019, 08:09 challgren @dereuromark DataTables is the only one that comes to mind
# Jul 18th 2019, 08:08 dereuromark Do people have easy to use plugins/code around AJAX and auto-complete, edit-in-place etc?
# Jul 18th 2019, 08:06 challgren Yep https://book.cakephp.org/3.0/en/orm/query-builder.html#passing-conditions-to-contain
# Jul 18th 2019, 08:06 scuadra Is this possible in Cake3?
# Jul 18th 2019, 08:05 scuadra Hello. As long as I remember in Cake 2 find it was possible to do something like 'contain' => ['Images' => ['limit' => 1]]
# Jul 18th 2019, 08:01 neon1024 Morning all
# Jul 18th 2019, 07:58 val Hi, is there a way to disable one specific cache configuration in 3.x?
# Jul 18th 2019, 07:03 welo.lamacchia but this code: $this->request->getCookie($cookieName) return null
# Jul 18th 2019, 07:03 welo.lamacchia i think it's work, chrome network panel showing the cookie just created
# Jul 18th 2019, 07:00 welo.lamacchia i have also to return the response?
# Jul 18th 2019, 06:59 admad you need to assign back the instance `$this->response = $this->response->withCookie($cookie);`
# Jul 18th 2019, 06:57 welo.lamacchia Cake does not save cookie, what is wrong?
# Jul 18th 2019, 06:47 ajibarra If you want to override the view you need to create src/Template/Plugin/CakeDC/Users/Users/profile.ctp
# Jul 18th 2019, 06:46 ajibarra because the user is sent to view layer including any contain in configuration..and if you need something more specific you can always override get method in your users table (in case you have one)
# Jul 18th 2019, 06:45 ajibarra You can just override the view
# Jul 18th 2019, 05:40 joey.mukherjee I am using the CakeDC/Users plugin and I want to override the cakedc/users/src/Controller/Traits/ProfileTrait.php file and add in some more fields to send to profile. How would I do that?
# Jul 18th 2019, 01:09 niel45 Then I have no suggestions. I don't do Windows any more
# Jul 18th 2019, 01:09 FueripoDesu I'm using an IIS on Windows Server, and the folder is in a shared folder of the network... but it's open for the internal network.
# Jul 18th 2019, 01:07 niel45 so on Debian or deriviatives the location would need either user or group to be accessible for www-data
# Jul 18th 2019, 01:07 niel45 check the location you are trying to put to has permissions for the www server
# Jul 18th 2019, 01:05 FueripoDesu Hello, can anybody help me, I'm having a "failed to open stream: Permission denied" in a controller that I'm trying to "file_put_contents"... where do I have to set permission for this?
# Jul 17th 2019, 22:22 dereuromark Yeah, AJAX delete is now working without the need to modify baked controller delete actions: https://sandbox.dereuromark.de/sandbox/ajax-examples/table (live demo)
# Jul 17th 2019, 22:21 maxxstyle06 Guys how to generate an access token for guest users that do not require logining in. What should I rely on. It’s for my api.
# Jul 17th 2019, 20:50 dereuromark is phpstan still working for core? "Fatal error: Interface 'PHPStan\Reflection\BrokerAwareClassReflectionExtension' not found in /.../vendor/cakephp/cakephp/tests/PHPStan/AssociationTableMixinClassReflectionExtension.php"
# Jul 17th 2019, 20:15 ckjksl I know I can `link()` them afterwards if i have the tag entities
# Jul 17th 2019, 20:14 ckjksl So from what I understand, it makes a new Entity for $articles using the data passed from the form. But how do I let cake know which Tags to associate with this article?
# Jul 17th 2019, 20:12 ckjksl `$entity = $articles->newEntity($this->request->getData(), ['associated' => ['Tags']]);
# Jul 17th 2019, 20:10 ckjksl Hi everyone. I'm trying to edit an entity using patchEntity() and add the associated tags with it, but I'm having a little trouble understanding the examples in the documentation
# Jul 17th 2019, 18:07 tmig I'll look at it, htank you
# Jul 17th 2019, 18:02 graziel https://book.cakephp.org/3.0/en/orm/query-builder.html#custom-functions
# Jul 17th 2019, 18:00 tmig I'm keeping reading the docs, but cannot figure out how to INSTR or TIMESTAMPDIFF
# Jul 17th 2019, 17:59 tmig I'm looking for the way to make a INSTR in the cake ORM, can anybody help me do that ?