# |
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 |
# |
Aug 7th 2018, 10:05 |
bernat |
I haven't* |
# |
Aug 7th 2018, 10:04 |
bernat |
I've checked it but if it works it must be reading it somewhere. |
# |
Aug 7th 2018, 10:04 |
spriz |
it also reads from ./plugins by default |
# |
Aug 7th 2018, 10:04 |
spriz |
but there’s no usage of `$this->params['app']` anywhere |
# |
Aug 7th 2018, 10:04 |
bernat |
It reads code from src/ and writes pot files to src/Locale by default. |
# |
Aug 7th 2018, 10:03 |
bernat |
It does all file operations realtive to that directory. |
# |
Aug 7th 2018, 10:03 |
spriz |
I can’t see where it’s used in the task/shell classes |
# |
Aug 7th 2018, 10:03 |
spriz |
but for what reason? |
# |
Aug 7th 2018, 10:00 |
bernat |
@spriz, it does tell the shell command where the app directory is. |
# |
Aug 7th 2018, 09:56 |
spriz |
Could anyone tell me what the `-app` options on the `I18nShell actually does? (link: https://github.com/cakephp/cakephp/blob/master/src/Shell/Task/ExtractTask.php#L316) |
# |
Aug 7th 2018, 09:45 |
bernat |
Anyone that can guide me? I've already found something but I'm not sure how to continue from here. |
# |
Aug 7th 2018, 09:44 |
bernat |
Hi. I'm trying to investigate this issue: https://github.com/AD7six/cakephp-shadow-translate/issues/52 |
# |
Aug 7th 2018, 09:36 |
nisseni |
I'm getting this error: default cache was unable to write '77cdf40047b7b8e666cec24ecbfdb1d9' to Memcached cache - can't find anything on google. I've tried File cache with the same result. |
# |
Aug 7th 2018, 08:40 |
clementcrown |
wao, thank you @chrisshick and @saeideng |