# |
Feb 19th 2020, 13:56 |
khalid |
any help will be much appreciated :) |
# |
Feb 19th 2020, 13:55 |
slackebot |
(!Configure::read('Acl.database')) { Configure::write('Acl.database', 'default');} so question is how can we use both Test and Application with ACL. |
# |
Feb 19th 2020, 13:55 |
khalid |
Hi Everyone, We are using Cakephp3 and Acl plugin from Cake, but problem is when we are running UnitTests its giving The datasource configuration "" was not found. but if we go to config/app.php and add 'Acl' => ['database' => 'test'] test works but then our main Application start failing because ACL is using Database Test now for Application too not only for tests further more i have seen Cakephp/Acl/config/bootstrap.php if |
# |
Feb 19th 2020, 13:53 |
kiwi_10 |
so question is how can we use both Test and Application with ACL. |
# |
Feb 19th 2020, 13:52 |
kiwi_10 |
further more i have seen Cakephp/Acl/config/bootstrap.php if (!Configure::read('Acl.database')) { Configure::write('Acl.database', 'default');} |
# |
Feb 19th 2020, 13:52 |
kiwi_10 |
but then our main Application start failing because ACL is using Database Test now for Application too not only for tests |
# |
Feb 19th 2020, 13:51 |
kiwi_10 |
but if we go to config/app.php and add 'Acl' => ['database' => 'test'] test works |
# |
Feb 19th 2020, 13:51 |
kiwi_10 |
Hi Everyone, We are using Cakephp3 and Acl plugin from Cake, but problem is when we are running UnitTests its giving The datasource configuration "" was not found. |
# |
Feb 19th 2020, 12:27 |
jotpe |
Hi, people! |
# |
Feb 19th 2020, 12:27 |
admad |
@val https://github.com/cakephp/authorization/pull/124 |
# |
Feb 19th 2020, 12:09 |
tomrwaller |
Haha at this point @ndm probably knows more about my project than I do! |
# |
Feb 19th 2020, 12:08 |
neon1024 |
Ah, there you are. A clever person appears! |
# |
Feb 19th 2020, 12:08 |
tomrwaller |
Ah - great @ndm - I'll give that a whirl. |
# |
Feb 19th 2020, 12:08 |
tomrwaller |
Thanks @neon1024 - I've followed that which is what I'm using. |
# |
Feb 19th 2020, 12:08 |
ndm |
Multi selects use the `selectMultiple` template |
# |
Feb 19th 2020, 12:07 |
neon1024 |
You may end up needing a custom form widget, but I haven’t used those before, so not too certain |
# |
Feb 19th 2020, 12:06 |
neon1024 |
I’d check the book https://book.cakephp.org/3/en/views/helpers/form.html#customizing-the-templates-formhelper-uses |
# |
Feb 19th 2020, 12:06 |
neon1024 |
Could be |
# |
Feb 19th 2020, 12:06 |
tomrwaller |
I have inputContainer - is that not the same thing? |
# |
Feb 19th 2020, 12:04 |
neon1024 |
Probably looking for the inputWrapper template? |
# |
Feb 19th 2020, 11:53 |
tomrwaller |
But in my HTML output the select isn't picking up the class. |
# |
Feb 19th 2020, 11:53 |
tomrwaller |
And in my form-templates.php I'm returning this: 'select' => '<div class="form-group"><select class="form-control" {{attrs}} name={{name}}>{{content}}<select></div>', |
# |
Feb 19th 2020, 11:53 |
tomrwaller |
I'm presenting the select on add.php like this: echo $this->Form->select('recommendationgroup_id', $recommendationgroups, ['multiple' => true]); |
# |
Feb 19th 2020, 11:52 |
tomrwaller |
Hey all - I have a form template that I'm using to apply wrapping divs/classess to form controls but it looks like it's not picking up the wrap for a select element - does anyone know why that might be? |
# |
Feb 19th 2020, 11:51 |
neon1024 |
Rather than what I’m doing, which is `->format('Y-m-d')` and comparing as strings |
# |
Feb 19th 2020, 11:51 |
neon1024 |
Can you compare two FrozenDate objects directly? |
# |
Feb 19th 2020, 10:57 |
neon1024 |
Yeah, I have lots of Chart javascript clutting up my template which is what got me thinking about it :) Thanks for the confirmation, I will refactor one of my dashboard graphs I need in two places |
# |
Feb 19th 2020, 10:56 |
admad |
@neon1024 view cells would be a good use case for that, just you will have to use inline js as cells are self contained |
# |
Feb 19th 2020, 10:53 |
admad |
@val possibly |
# |
Feb 19th 2020, 10:52 |
neon1024 |
Anyway, just a thought :) |
# |
Feb 19th 2020, 10:51 |
neon1024 |
..but then you end up with lots of controller code, and the graphs are less contained and portalable, as you’d have to migrate the controller code to source the data if you re-used the graph |
# |
Feb 19th 2020, 10:36 |
kaliel |
@neon1024 i would rather go for elements and passed data, like angular parent->child input binding |
# |
Feb 19th 2020, 10:30 |
neon1024 |
When creating a dashboard with graphs, would it be logical to make each graph a View Cell? So that a dashboard is comprised to View Cells to contain a graphs data and js (I’m using chart.js) in self contained template? ..and make the graphs re-usable |
# |
Feb 19th 2020, 09:38 |
val |
@admad https://github.com/cakephp/authorization/commit/fb894a0e163a37c91347b5603002ef9ec615062a#diff-b5d0ee8c97c7abd7e3fa29b9a27d1780L12 was it a error that "cakephp/core" was changed to "cakephp/cakephp"? |
# |
Feb 19th 2020, 09:34 |
javier.villanueva |
@conehead thanks! now works with update() |
# |
Feb 19th 2020, 09:23 |
conehead |
Hm just wondering...is there a general "most common" file encoding to use when coding? Should files be UTF-8 with LF? I mean for pretty much every language? |
# |
Feb 19th 2020, 09:13 |
dereuromark |
again, depends on the packages (namespaces) used inside the plugin. check this and check if you can resolve it to split packages as well |
# |
Feb 19th 2020, 09:12 |
val |
https://github.com/cakephp/authorization/blob/1.x/composer.json has dependency to "cakephp/core" but https://github.com/cakephp/authorization/blob/master/composer.json has dependency to "cakephp/cakephp". Why is that? |
# |
Feb 19th 2020, 09:05 |
conehead |
@javier.villanueva you called save or update afterwards? |
# |
Feb 19th 2020, 09:04 |
val |
I got the impression that the idea of authentication and authorization plugins was to decouple it from controllers layer |
# |
Feb 19th 2020, 09:00 |
dereuromark |
find out the packages needed, maybe it is. |