# |
Jun 28th 2017, 14:42 |
jarard |
admin/Properties = index, view |
# |
Jun 28th 2017, 14:42 |
jeremyharris |
great! |
# |
Jun 28th 2017, 14:42 |
chris-andre |
https://gist.github.com/chris-andre/4e6d9bda6d671feb3a529654b931fe05#file-customerstable-php-L46 |
# |
Jun 28th 2017, 14:42 |
jarard |
it's ok I found the solution in the plugin readme :) |
# |
Jun 28th 2017, 14:41 |
jeremyharris |
right, you said “validation is triggered” I just want to make sure it’s using the proper profile |
# |
Jun 28th 2017, 14:41 |
chris-andre |
validationNew() is the validation set for new records created in CustomersController's add action. |
# |
Jun 28th 2017, 14:41 |
jeremyharris |
just a guess |
# |
Jun 28th 2017, 14:41 |
jeremyharris |
maybe Admin.Properties = index, view |
# |
Jun 28th 2017, 14:41 |
jarard |
likely it would seem |
# |
Jun 28th 2017, 14:40 |
jeremyharris |
jarard oh I don’t know tiny auth. Perhaps you need to specify rules for the admin prefix too? |
# |
Jun 28th 2017, 14:40 |
jeremyharris |
@chris-andre validationNew specifically is? |
# |
Jun 28th 2017, 14:40 |
jarard |
I am using TinyAuth and I have the line: Properties = index, view |
# |
Jun 28th 2017, 14:39 |
chris-andre |
validation is triggered, the rule method is not |
# |
Jun 28th 2017, 14:39 |
jeremyharris |
jarard I’m not seeing where it’s allowed. is it in a parent method? |
# |
Jun 28th 2017, 14:38 |
jeremyharris |
@chris-andre are you sure the method is being triggered? what’s the entity look like? |
# |
Jun 28th 2017, 14:38 |
jarard |
sure: https://gist.github.com/spacebiscuit/23245d03e1490c3e33e08981b6429e8a |
# |
Jun 28th 2017, 14:37 |
jeremyharris |
jarard and your PropertiesController in the Admin namespace is allowed? can you gist it? |
# |
Jun 28th 2017, 14:36 |
chris-andre |
Does anyone understand why a my entity returns without any errors after this validation https://gist.github.com/chris-andre/4e6d9bda6d671feb3a529654b931fe05#file-customerstable-php-L22 ? |
# |
Jun 28th 2017, 14:35 |
jarard |
jeremyharris, I just followed the book, I added the configure write to bootstrap.php and the lines to routes.php |
# |
Jun 28th 2017, 14:34 |
jeremyharris |
jarard do you have some authorization that checks the prefix? |
# |
Jun 28th 2017, 14:17 |
jarard |
I don't have my users model prperly set up yet so can't actually login but I think I should still be able to access admin/properties |
# |
Jun 28th 2017, 14:17 |
jarard |
properties/index is an allowed action |
# |
Jun 28th 2017, 14:16 |
jarard |
I've added admin prefix routing to my project, but now I'm getting a re-direct to login when I brwose to admin/properties |
# |
Jun 28th 2017, 14:11 |
Leonardo_0112 |
right, i'll try create a composer package |
# |
Jun 28th 2017, 14:10 |
dereuromark |
copy and pasting into plugins dir also doesnt really get you any more updates easily then |
# |
Jun 28th 2017, 14:10 |
dereuromark |
but what you are trying to do sounds wacky, at best. |
# |
Jun 28th 2017, 14:09 |
dereuromark |
you can also PR any abstract additions that would help you. |
# |
Jun 28th 2017, 14:09 |
dereuromark |
either fork it and use that, or make your own composer package. |
# |
Jun 28th 2017, 14:09 |
dereuromark |
you are doing it wrong then. |
# |
Jun 28th 2017, 14:09 |
Leonardo_0112 |
actually it's a cart plugin that store products based on its ID as session key. I'd like to use 'code' instead ID. If I change two lines from a file in vendor it works, but every time when run composer update or install it'll be lost |
# |
Jun 28th 2017, 14:08 |
dereuromark |
also, plugins dir is reserved for non-installed (repo-own) ones, code directly there without composer usage. |
# |
Jun 28th 2017, 14:05 |
dereuromark |
ask yourself - that would quickly resolve to "you really dont need to" usually :slightly_smiling_face: |
# |
Jun 28th 2017, 14:05 |
dereuromark |
why? |
# |
Jun 28th 2017, 14:02 |
Leonardo_0112 |
In cake3, there is a plugin installed in vendor folder via composer. I'd like to install it in /plugins. How can I do it? |
# |
Jun 28th 2017, 13:56 |
neon1024 |
I use an if statement myself |
# |
Jun 28th 2017, 13:51 |
jarard |
should I just add a conditional statement to beforeFilter or is that inefficient? |
# |
Jun 28th 2017, 13:51 |
jarard |
but this will add the theme site-wide, any suggestions how I can hook this up to admin routes? |
# |
Jun 28th 2017, 13:50 |
jarard |
I want to use a theme for my admin, the package says to add to the beforeFIlter of AppController: $this->viewBuilder()->theme('Gentelella'); |
# |
Jun 28th 2017, 13:44 |
neon1024 |
@gutts That might be \Cake\ORM\ResultSet I think, you might need to check that one :slightly_smiling_face: |
# |
Jun 28th 2017, 13:44 |
saeideng |
i think i can not using `orWhere(c,d)->orWhere(e,f)` for `or(a and b) or (c and d) or (e and f)` |
# |
Jun 28th 2017, 13:43 |
saeideng |
i think i can not using `or(a and b) or (c and d) or (e and f)` for `or(a and b) or (c and d) or (e and f)` |