Log message #4201530

# At Username Text
# Sep 4th 2019, 10:20 conehead Was just wondering because I got like 20 menu items. And every time I load a page it is checked if the permission exists for each of these elements
# Sep 4th 2019, 10:20 neon1024 My Auth finder does load permissions into the session though
# Sep 4th 2019, 10:19 neon1024 At least then if someone changes someone’s access, my RoleAuthorize class checks the DB. Otherwise they’ll have permissions until they close the browser
# Sep 4th 2019, 10:18 neon1024 I do both
# Sep 4th 2019, 10:13 conehead Right now I still check from database. rbac
# Sep 4th 2019, 10:13 conehead Would you keep user permissions in sessions?
# Sep 4th 2019, 10:03 neon1024 Well any help we can give, do let us know :thumbsup:
# Sep 4th 2019, 10:02 felix.robaglia (just an intern, I have a lot to learn hehe)
# Sep 4th 2019, 10:02 felix.robaglia It is a tinyint indeed, didn't know I could use a boolean but that makes sense actually. Would make the code clearer, thanks :slightly_smiling_face:
# Sep 4th 2019, 10:00 neon1024 If it’s a `TINYINT(1)` you could use a boolean too :slightly_smiling_face:
# Sep 4th 2019, 10:00 felix.robaglia I'm not sure, prolly cause i'm dumb, just tested without quoting and it works :C
# Sep 4th 2019, 09:57 neon1024 Just curious @felix.robaglia why do you quote your `'1'` ?
# Sep 4th 2019, 09:56 conehead Challgren`s option is best if you would like to define your query further
# Sep 4th 2019, 09:56 challgren Better than too little!
# Sep 4th 2019, 09:56 felix.robaglia That's a lot of solutions, thanks a lot everyone ! :slightly_smiling_face:
# Sep 4th 2019, 09:55 conehead Too many options :)
# Sep 4th 2019, 09:54 slackebot <challgren>
# Sep 4th 2019, 09:54 neon1024 Or even `->contain('Contracts.Source')` :)
# Sep 4th 2019, 09:53 challgren of you could pass a callback with a Query as the parameter
# Sep 4th 2019, 09:53 conehead @felix.robaglia ```$clients = $clientsT ->find('all') ->contain([ 'Contracts' => [ 'Source', ], ]) ->where(['active' => '1']);```
# Sep 4th 2019, 09:52 felix.robaglia so I need to say that Contracts contain Source, but I'm not sure I can do that. Any idea ?
# Sep 4th 2019, 09:51 felix.robaglia It retrieves all `clients` and their `contracts`. But each `contract `is connected to a `source`, and I want to retrieve that `source` aswell
# Sep 4th 2019, 09:50 felix.robaglia Hello guys, I have a question about "nested" contains, I have this line of code : `$clients = $clientsT->find('all')->contain(['Contracts'])->where(['active' => '1']);`
# Sep 4th 2019, 09:42 val thanks
# Sep 4th 2019, 09:38 neon1024 Yeah, I’d agree with @dereuromark `beforeMarshal`
# Sep 4th 2019, 09:28 dereuromark Looking at either one, you should be able to retrieve beforeMarshal() as applicable.
# Sep 4th 2019, 09:26 val Nothing is found for "beforeValidate" in 3.x cookbook
# Sep 4th 2019, 09:23 dereuromark See docs or https://github.com/dereuromark/executionorder
# Sep 4th 2019, 09:23 val Hi, there is beforeValidate callback in 2.x. What it has been replaced with in 3.x?
# Sep 4th 2019, 08:01 jeremy.halin I've tried by overriding property getter in entity, but it's never empty because `Translate` behavior will get content from original table if current locale is empty. I want to force a specific locale. I can force it but then, how do I check if there is content or not.
# Sep 4th 2019, 07:59 jeremy.halin For `Translate` behavior, is there any way to set fallback language ? For example if locale is set to `es_ES` but no translation are available for this language, it will default to `App.defaultLocale` which means it will get data directly from original table (and not `i18n`). What if I want to display `fr_FR` when `es_ES` is not available ?
# Sep 4th 2019, 07:56 jeremy.halin Hi ! :wave:
# Sep 4th 2019, 07:13 COOurb yo
# Sep 4th 2019, 07:12 alexdd55976 good morning
# Sep 4th 2019, 07:10 COOurb so based on this id I'm passing extra data to proceed
# Sep 4th 2019, 07:09 COOurb or id
# Sep 4th 2019, 07:09 COOurb every droplist has it's own name
# Sep 4th 2019, 07:09 COOurb again, I have several droplists
# Sep 4th 2019, 07:08 COOurb because I need to tie different enities
# Sep 4th 2019, 07:07 COOurb my goal is to send request with structured data, like this request['field1'=>'value1', 'field2'=>'value2', 'fieldset1'=>['fs1'=>'val1', 'fs2'=>'val2']]
# Sep 4th 2019, 07:06 spriz I am not sure I understand your goal - but did you try the `'multiple' => true` from https://book.cakephp.org/3.0/en/views/helpers/form.html#options-for-select-checkbox-and-radio-controls ? :slightly_smiling_face: