Log message #4226542

# At Username Text
# Feb 12th 2020, 18:43 sebastian.krzewinski. 5 min ago its was working.. /admin
# Feb 12th 2020, 18:41 sebastian.krzewinski. ;/
# Feb 12th 2020, 18:41 sebastian.krzewinski. https://i.imgur.com/HjlBkbk.gifv
# Feb 12th 2020, 18:09 sebastian.krzewinski. Hello, if i want to create link to np localhost/admin to create there admin panel i need to do prefix in routes and folder admin with funcions in controler/template ?
# Feb 12th 2020, 17:04 ndm The ones listed above, `app_uses`, `rename_classes`, etc., they're shown when you run `bin/cake upgrade --help`
# Feb 12th 2020, 17:00 siiva108 hello bakers. I'm upgrading an old 2.x to 3.x. Going through this guide: https://book.cakephp.org/3/en/upgrade-tool.html. At the very end it says "After these two commands, you can run the remaining subcommands in any order.". What subcommands would that be referring to?
# Feb 12th 2020, 16:34 ndm Then you probably want to look into the request authorization middleware. If you don't really need all that versatility, look into plugins like TinyAuth.
# Feb 12th 2020, 16:32 kaliel @ndm thank you, it works fine, i'd like to manage authorizations based on prefix (like in 3.x) :)
# Feb 12th 2020, 16:31 ndm @kaliel The authentication middleware by default only identifies you, it won't restrict access. The authentication component however does by default require an identity to grant access to any resource at all, that's kinda like authorization, but also a little but in the splitting hairs territory. You can disable that behavior by setting the components `requireIdentity` option to `false`.
# Feb 12th 2020, 16:22 kaliel hey, in cake 4.0.3, since i enabled Authentication plugin, i can't access anything. Isn't that supposed to be the job for Authorization plugin ? How to tell everything is accessible when unauthenticated ?
# Feb 12th 2020, 16:20 ndm No problem. Generally mocking a model via `getMockForModel` will populate the global table registry with the mock accordingly, so it should work pretty much anywhere where CakePHP's table loading mechanisms are being used.
# Feb 12th 2020, 16:14 dan874 @ndm thanks for explaining it though as it does mean i can do what i was thinking i could do
# Feb 12th 2020, 16:14 dan874 @ndm yeah thats what im currently doing and as im sat here now i can see my error. i feel a bit dumb now :|
# Feb 12th 2020, 16:14 challgren Anyone see `Expression is missing operator (IS, IS NOT) with null value.` on CounterCache?
# Feb 12th 2020, 16:13 ndm @dan874 Or maybe I'm misunderstanding what you're trying to do. If you're trying to mock a mock a model that your feature class uses/loads via `ModelAwareTrait::loadModel()`, that should work fine
# Feb 12th 2020, 16:06 ndm @dan874 Model/Table classes are something rather specific, its classes that do extend `\Cake\ORM\Table`, and that's what `getMockForModel()` expects, you can't just use any class with it. So if your feature class doesn't actually extend `\Cake\ORM\Table`, then you'll have to use the generic mocking methods.
# Feb 12th 2020, 16:01 damiano yes i need it because often the users are lazy and they came from a click inside an email, so i would like to log the user directly. I need to find a good compromise of user freedom and security :)
# Feb 12th 2020, 16:00 damiano @ndm awesome! thanks!
# Feb 12th 2020, 15:58 slackebot and instead of creating a feature class i should perhaps build out component classes instead.
# Feb 12th 2020, 15:58 dan874 @ndm im basically trying to figure out the best way to go about testing in cake im coming from a mainly laravel background so ive built out a feature class that only link to cake is to use the `ModelAwareTrait` so i can load models into it. but for some reason in my tests when i mock that model and try and get it to return false its not mocking the model being used, so i was wondering if the way im going about building out features is wrong
# Feb 12th 2020, 15:57 slackebot (`$this->Authentication->getAuthenticationService()->getAuthenticationProvider()`) etc
# Feb 12th 2020, 15:57 ndm @damiano The token authenticator is a stateless authenticator, as mentioned, they do not trigger automatic identity persisting. If you really need to persist an identity that was authenticated via a stateless authenticator, then you can for example do that manually via the authentication component, like: `$this->Authentication->setIdentity($user)`. You may need to do additional checks before doing so, like checking what authenticator was used
# Feb 12th 2020, 15:55 ndm @dan874 `getMockForModel()` is a method of `\Cake\TestSuite\TestCase`, what exactly does this have to do with components?
# Feb 12th 2020, 15:49 damiano is that possible via TokenAuthenticator?
# Feb 12th 2020, 15:49 damiano i mean, i would liek to avoi d adding the token parameter for each request, i would do something like: /users/login/token=blabla --> then logged --> redirect the user to his dashboard
# Feb 12th 2020, 15:48 damiano i mean, if i check if the user can log via token parameter the isValid()) method returns true...but... i then do not see any Auth Session, how can i create the auth via token ?
# Feb 12th 2020, 15:48 damiano guys, i have implemented the TokenAuthenticator it works perfectly, i can log the user via token querystring parameter...the problem is that i do not see any "Auth" session being created...why?
# Feb 12th 2020, 15:38 dan874 Hi all, quick one if im looking to build a feature class is it better to build this as a component so its in the "cake" lifecycle and its aware of it or can i build it as a stand alone class and expect things like `getMockModel` to work. I've basically done the second and it doesnt seem to be working as expected.
# Feb 12th 2020, 15:32 dan874 afternoon all
# Feb 12th 2020, 15:27 neon1024 Afternoon everyone! :wave:
# Feb 12th 2020, 15:14 damiano why authentication plugin queries are not shown in debugkit (sqlog)?
# Feb 12th 2020, 13:58 dereuromark :)
# Feb 12th 2020, 13:58 challgren Yeah, I just need to figure out how the hell to use twig
# Feb 12th 2020, 13:58 dereuromark thought you meant the actual plugin code
# Feb 12th 2020, 13:58 dereuromark oh, bake.. there you need manually, yeah
# Feb 12th 2020, 13:58 challgren when baking?
# Feb 12th 2020, 13:58 dereuromark ideally of course you are always fully up to date here even on plugins :)
# Feb 12th 2020, 13:57 dereuromark you can use ide helper to add those, with -p PluginName
# Feb 12th 2020, 13:56 challgren Same that ide-helper would add
# Feb 12th 2020, 13:55 damiano ok perfect @challgren
# Feb 12th 2020, 13:55 dereuromark @challgren what kind of?