Log message #4165360

# At Username Text
# Aug 7th 2018, 12:17 spriz >“I don’t see a lot of tests covering the comments in the file, and my regex is not strong - so maybe someone would like to help a bit? :+1:“ ;P
# Aug 7th 2018, 12:16 admad @spriz where are the tests? :slightly_smiling_face:
# Aug 7th 2018, 12:04 dereuromark That is all on you
# Aug 7th 2018, 12:04 dereuromark And it is a good idea :slightly_smiling_face:
# Aug 7th 2018, 12:03 spriz your :+1: was guidance enough :,)
# Aug 7th 2018, 12:03 admad welcome, but i gave no guidance in this case :slightly_smiling_face:
# Aug 7th 2018, 12:02 spriz Done https://github.com/cakephp/cakephp/pull/12438 :slightly_smiling_face: Thanks a lot for the guidance
# Aug 7th 2018, 11:43 spriz roger
# Aug 7th 2018, 11:42 admad sounds good to me. you can target `3.next`
# Aug 7th 2018, 11:42 spriz roger - if you don’t see any big downsides of it, I’ll fire it into a PR :slightly_smiling_face: just didn’t want to waste time if I just overlooked something crayz
# Aug 7th 2018, 11:41 admad makes sense
# Aug 7th 2018, 11:41 spriz so if any dev would update it outside the CI server it generates a shit ton of diffs ,:(
# Aug 7th 2018, 11:40 spriz we create this files on our CI server - so it’s /var/lib/jenkins/jobs/{job-name}/{workspace-n}/project
# Aug 7th 2018, 11:40 admad well then :+1: :slightly_smiling_face:
# Aug 7th 2018, 11:40 spriz yurp
# Aug 7th 2018, 11:40 admad ah you want relative paths in the comments?
# Aug 7th 2018, 11:39 spriz to me it just doesn’t makse sense with full paths in the `*.pot` files
# Aug 7th 2018, 11:39 spriz Okay, so that’s a bad idea I guess?
# Aug 7th 2018, 11:38 admad @spriz i stopped reading further once i encountered "Use relative paths..."
# Aug 7th 2018, 11:36 spriz Any Cake core guy could say either :+1: or :-1: for this change/addition to the `bin/cake i18n extract` command: https://www.diffchecker.com/AHg3f8NY ?
# Aug 7th 2018, 11:30 slackebot https://github.com/CakeDC/auth/blob/master/tests/TestCase/Auth/ApiKeyAuthenticateTest.php 5. this feature will be replaced by https://github.com/cakephp/authentication/blob/master/src/Authenticator/TokenAuthenticator.php in a near-future version of the plugin
# Aug 7th 2018, 11:30 steinkel hi @vinicius.big not exactly an example, but here's what you can do to make it work: 1. ensure you have a working user (you can login via login form) 2. add some value to the api_token in the database, for example "12345" 3. check you can access your application now using the authorize object, passing the API token as a get param "?api_key=12345" 4. you can also check the unit tests for examples on how to use it or configure it
# Aug 7th 2018, 11:22 vinicius.big Hello guys! Does anyone has an example on how to work with `CakeDC/User` API Token? Whats is the flow to connect, for example, an app using token? How can I authenticate an user to consume data from my controllers?
# Aug 7th 2018, 11:08 steinkel add your Authorization object to the Auth configuration and you'll be OK
# Aug 7th 2018, 10:59 itmpls would i have to disable any cakedc setting?
# Aug 7th 2018, 10:59 itmpls ah, so the order might be off. thanks
# Aug 7th 2018, 10:54 steinkel keep in mind you'll need to be authenticated for this to work properly
# Aug 7th 2018, 10:53 steinkel Auth will check them in order, if any of them return true, you'll be authorized
# Aug 7th 2018, 10:53 steinkel check the order of the Authorization objects, adding a dummy (return true) one would work as you mentioned
# Aug 7th 2018, 10:50 itmpls also using cakedc/users
# Aug 7th 2018, 10:50 itmpls tried to specify function isAuthorized() { return true; } in app controller
# Aug 7th 2018, 10:50 itmpls is there a way to hardcode / bypass authorization when implementing Auth? i have authentication set, but I need to figure out the permissions stuff later
# Aug 7th 2018, 10:11 bernat You could do string subtitution in the pot file after extraction.
# Aug 7th 2018, 10:11 bernat The code that extracts the strings is usually low levels staff that doesn't know about relative directories. You could be adding strings from anywhere to your pot. I guess that's why it uses absolute paths.
# Aug 7th 2018, 10:09 spriz unfortunately it doesn’t :)
# Aug 7th 2018, 10:08 bernat Yes, I think it should work like that by default.
# Aug 7th 2018, 10:08 spriz Would be awesome to replace `/var/lib/jenkins/jobs/apacta-translations-update/workspace/plugins/Companies/src/Template/Element/navbar.ctp:56` with `./plugins/Companies/src/Template/Element/navbar.ctp:56`
# Aug 7th 2018, 10:07 spriz I hoped it should be used to remove the full path in the `*.pot` file locations
# Aug 7th 2018, 10:06 spriz it seems to use ‘paths’ to actually find the things anyway
# Aug 7th 2018, 10:06 spriz I guess it’s some old unused code then :slightly_smiling_face:
# Aug 7th 2018, 10:05 spriz roger