From 4bb39ed39be34dc34e740be932ae8e811614b999 Mon Sep 17 00:00:00 2001 From: Alejandro Ibarra Date: Fri, 5 Apr 2024 13:19:33 +0200 Subject: [PATCH 01/29] Add support for reCaptcha v3 --- Docs/Documentation/Configuration.md | 1 + config/users.php | 2 + src/View/Helper/UserHelper.php | 77 ++++++++++++++++--- templates/Users/login.php | 2 +- templates/Users/register.php | 2 +- tests/TestCase/View/Helper/UserHelperTest.php | 54 +++++++++++++ webroot/js/reCaptchaV3.js | 3 + 7 files changed, 127 insertions(+), 14 deletions(-) create mode 100644 webroot/js/reCaptchaV3.js diff --git a/Docs/Documentation/Configuration.md b/Docs/Documentation/Configuration.md index 01b960aa4..64ee6a8b6 100644 --- a/Docs/Documentation/Configuration.md +++ b/Docs/Documentation/Configuration.md @@ -54,6 +54,7 @@ and add this to your config/users.php file: ```php 'Users.reCaptcha.key' => 'YOUR RECAPTCHA KEY', 'Users.reCaptcha.secret' => 'YOUR RECAPTCHA SECRET', +'Users.reCaptcha.version' => '2', //defaults to version 2 (backward compatibility) but you can use version 3 which is recommended 'Users.reCaptcha.registration' => true, //enable on registration 'Users.reCaptcha.login' => true, //enable on login ``` diff --git a/config/users.php b/config/users.php index 3f347e18e..41cb241f7 100644 --- a/config/users.php +++ b/config/users.php @@ -71,6 +71,8 @@ 'key' => null, // reCaptcha secret 'secret' => null, + // reCaptcha version. keep 2 for backward compatibility + 'version' => 2, // use reCaptcha in registration 'registration' => false, // use reCaptcha in login, valid values are false, true diff --git a/src/View/Helper/UserHelper.php b/src/View/Helper/UserHelper.php index 691ec0fce..b4bbf496f 100644 --- a/src/View/Helper/UserHelper.php +++ b/src/View/Helper/UserHelper.php @@ -18,6 +18,8 @@ use Cake\Utility\Inflector; use Cake\View\Helper; use CakeDC\Users\Utility\UsersUrl; +use Exception; +use InvalidArgumentException; /** * User helper @@ -42,7 +44,7 @@ class UserHelper extends Helper * @param array $options options * @return string */ - public function socialLogin($name, $options = []) + public function socialLogin(string $name, array $options = []): string { if (empty($options['label'])) { $options['label'] = __d('cake_d_c/users', 'Sign in with'); @@ -74,7 +76,7 @@ public function socialLogin($name, $options = []) * @param array $providerOptions Provider link options. * @return array Links to Social Login Urls */ - public function socialLoginList(array $providerOptions = []) + public function socialLoginList(array $providerOptions = []): array { if (!Configure::read('Users.Social.login')) { return []; @@ -105,7 +107,7 @@ public function socialLoginList(array $providerOptions = []) * @param array $options Array with option data. * @return string */ - public function logout($message = null, $options = []) + public function logout(?string $message = null, array $options = []): string { $url = UsersUrl::actionUrl('logout'); $title = empty($message) ? __d('cake_d_c/users', 'Logout') : $message; @@ -118,7 +120,7 @@ public function logout($message = null, $options = []) * * @return string|null */ - public function welcome() + public function welcome(): ?string { $identity = $this->getView()->getRequest()->getAttribute('identity'); if (!$identity) { @@ -143,7 +145,7 @@ public function welcome() * * @return void */ - public function addReCaptchaScript() + public function addReCaptchaScript(): void { $this->Html->script('https://www.google.com/recaptcha/api.js', [ 'block' => 'script', @@ -155,7 +157,7 @@ public function addReCaptchaScript() * * @return mixed */ - public function addReCaptcha() + public function addReCaptcha(): mixed { if (!Configure::read('Users.reCaptcha.key')) { return $this->Html->tag( @@ -167,10 +169,29 @@ public function addReCaptcha() ); } $this->addReCaptchaScript(); - try { - $this->Form->unlockField('g-recaptcha-response'); - } catch (\Exception $e) { + $version = Configure::read('Users.reCaptcha.version', 2); + $method = "addReCaptchaV$version"; + if (method_exists($this, $method)) { + try { + $this->Form->unlockField('g-recaptcha-response'); + } catch (Exception $e) { + } + + return $this->{$method}(); } + throw new InvalidArgumentException( + __d('cake_d_c/users', 'reCaptcha version is wrong. Please configure Users.reCaptcha.version as 2 or 3') + ); + } + + /** + * Add required element for reCaptcha v2 + * + * @return string + */ + private function addReCaptchaV2(): string + { + deprecationWarning('14.2.0', 'reCaptcha version 3 will be used as default in version 15.0.0'); return $this->Html->tag('div', '', [ 'class' => 'g-recaptcha', @@ -181,6 +202,38 @@ public function addReCaptcha() ]); } + /** + * Add required script for reCaptcha v3 + */ + private function addReCaptchaV3(): void + { + $this->Html->script('CakeDC/Users.reCaptchaV3', [ + 'block' => 'script', + ]); + } + + /** + * Add required options for reCaptcha v3 + * + * @param string $title + * @param array $options + * @return string + */ + public function button(string $title, array $options = []): string + { + $key = Configure::read('Users.reCaptcha.key'); + if ($key && Configure::read('Users.reCaptcha.version', 2) === 3) { + $options = array_merge($options, [ + 'class' => 'g-recaptcha', + 'data-sitekey' => $key, + 'data-callback' => 'onSubmit', + 'data-action' => 'submit', + ]); + } + + return $this->Form->button($title, $options); + } + /** * Generate a link if the target url is authorized for the logged in user * @@ -190,7 +243,7 @@ public function addReCaptcha() * @param array $options Array with option data. * @return string */ - public function link($title, $url = null, array $options = []) + public function link(string $title, array|string|null $url = null, array $options = []): string { trigger_error( 'UserHelper::link() deprecated since 3.2.1. Use AuthLinkHelper::link() instead', @@ -208,7 +261,7 @@ public function link($title, $url = null, array $options = []) * @param bool $isConnected User is connected with this provider * @return string */ - public function socialConnectLink($name, $provider, $isConnected = false) + public function socialConnectLink(string $name, array $provider, bool $isConnected = false): string { $optionClass = $provider['options']['class'] ?? null; $linkClass = 'btn btn-social btn-' . strtolower($name) . ($optionClass ? ' ' . $optionClass : ''); @@ -236,7 +289,7 @@ public function socialConnectLink($name, $provider, $isConnected = false) * @param array $socialAccounts All social accounts connected by a user. * @return string */ - public function socialConnectLinkList($socialAccounts = []) + public function socialConnectLinkList(array $socialAccounts = []): string { if (!Configure::read('Users.Social.login')) { return ''; diff --git a/templates/Users/login.php b/templates/Users/login.php index 99aaf4edd..2df2dab9d 100644 --- a/templates/Users/login.php +++ b/templates/Users/login.php @@ -45,6 +45,6 @@ ?> User->socialLoginList()); ?> - Form->button(__d('cake_d_c/users', 'Login')); ?> + User->button(__d('cake_d_c/users', 'Login')); ?> Form->end() ?> diff --git a/templates/Users/register.php b/templates/Users/register.php index e82673b67..1216b4599 100644 --- a/templates/Users/register.php +++ b/templates/Users/register.php @@ -35,6 +35,6 @@ } ?> - Form->button(__d('cake_d_c/users', 'Submit')) ?> + User->button(__d('cake_d_c/users', 'Submit')) ?> Form->end() ?> diff --git a/tests/TestCase/View/Helper/UserHelperTest.php b/tests/TestCase/View/Helper/UserHelperTest.php index a277ec50a..fb639330b 100644 --- a/tests/TestCase/View/Helper/UserHelperTest.php +++ b/tests/TestCase/View/Helper/UserHelperTest.php @@ -51,6 +51,16 @@ class UserHelperTest extends TestCase */ private $AuthLink; + /** + * @var (\Cake\View\View&\PHPUnit\Framework\MockObject\MockObject)|\PHPUnit\Framework\MockObject\MockObject + */ + private $View; + + /** + * @var ServerRequest + */ + private $request; + /** * setUp method * @@ -237,6 +247,50 @@ public function testAddReCaptcha() $this->assertEquals('
', $result); } + /** + * Test add ReCaptcha V3 + * + * @return void + */ + public function testAddReCaptchaV3() + { + $this->View->expects($this->exactly(2)) + ->method('append') + ->willReturnMap([ + ['https://www.google.com/recaptcha/api.js', null], + ['CakeDC/Users.reCaptchaV3', null], + ]); + Configure::write('Users.reCaptcha.key', 'testKey'); + Configure::write('Users.reCaptcha.version', 3); + Configure::write('Users.reCaptcha.theme', 'light'); + Configure::write('Users.reCaptcha.size', 'normal'); + Configure::write('Users.reCaptcha.tabindex', '3'); + $this->User->Form->create(); + $this->User->addReCaptcha(); + } + + public function testButton() + { + $title = 'test'; + $options = ['test' => 'test']; + $this->assertEquals($this->User->Form->button($title, $options), $this->User->button($title, $options)); + } + + public function testButtonReCaptchaV3() + { + Configure::write('Users.reCaptcha.key', 'testKey'); + Configure::write('Users.reCaptcha.version', 3); + $title = 'test'; + $options = ['test' => 'test']; + $reCaptchaOptions = [ + 'class' => 'g-recaptcha', + 'data-sitekey' => 'testKey', + 'data-callback' => 'onSubmit', + 'data-action' => 'submit', + ]; + $this->assertEquals($this->User->Form->button($title, array_merge($options, $reCaptchaOptions)), $this->User->button($title, $options)); + } + /** * Test add ReCaptcha field * diff --git a/webroot/js/reCaptchaV3.js b/webroot/js/reCaptchaV3.js new file mode 100644 index 000000000..42d4d65e7 --- /dev/null +++ b/webroot/js/reCaptchaV3.js @@ -0,0 +1,3 @@ +function onSubmit(token) { + document.forms[0].submit() +} From 5e2a71f8a454f360a9f8a212093705a285cf12fa Mon Sep 17 00:00:00 2001 From: Alejandro Ibarra Date: Fri, 19 Apr 2024 11:44:03 +0200 Subject: [PATCH 02/29] Add password meter for registration and change password --- config/users.php | 4 + src/View/Helper/UserHelper.php | 26 ++- templates/Users/change_password.php | 8 +- templates/Users/profile.php | 2 +- templates/Users/register.php | 7 +- ...PasswordManagementTraitIntegrationTest.php | 2 +- .../RegisterTraitIntegrationTest.php | 8 +- .../SimpleCrudTraitIntegrationTest.php | 2 +- webroot/js/pswmeter.js | 150 ++++++++++++++++++ 9 files changed, 196 insertions(+), 13 deletions(-) create mode 100644 webroot/js/pswmeter.js diff --git a/config/users.php b/config/users.php index 41cb241f7..860508b0a 100644 --- a/config/users.php +++ b/config/users.php @@ -78,6 +78,10 @@ // use reCaptcha in login, valid values are false, true 'login' => false, ], + 'passwordMeter' => [ + 'enabled' => true, + 'requiredScore' => 3, + ], 'Tos' => [ // determines if the user should include tos accepted 'required' => true, diff --git a/src/View/Helper/UserHelper.php b/src/View/Helper/UserHelper.php index b4bbf496f..dd3d500e1 100644 --- a/src/View/Helper/UserHelper.php +++ b/src/View/Helper/UserHelper.php @@ -18,7 +18,6 @@ use Cake\Utility\Inflector; use Cake\View\Helper; use CakeDC\Users\Utility\UsersUrl; -use Exception; use InvalidArgumentException; /** @@ -152,6 +151,29 @@ public function addReCaptchaScript(): void ]); } + /** + * @return void + */ + public function addPasswordMeterStript(): void + { + $this->Html->script('CakeDC/Users.pswmeter', [ + 'block' => 'script', + ]); + } + + /** + * @return string + */ + public function addPasswordMeter(): string + { + $this->addPasswordMeterStript(); + $requiredScore = Configure::read('Users.passwordMeter.requiredScore', 3); + $script = $this->Html->scriptBlock("const requiredScore = $requiredScore", ['defer' => true]); + + return $this->Html->tag('div', '', ['id' => 'pswmeter']) . + $this->Html->tag('div', '', ['id' => 'pswmeter-message']) . $script; + } + /** * Add reCaptcha to the form * @@ -174,7 +196,7 @@ public function addReCaptcha(): mixed if (method_exists($this, $method)) { try { $this->Form->unlockField('g-recaptcha-response'); - } catch (Exception $e) { + } catch (\Exception $e) { } return $this->{$method}(); diff --git a/templates/Users/change_password.php b/templates/Users/change_password.php index 7efba8f10..c266c3aa3 100644 --- a/templates/Users/change_password.php +++ b/templates/Users/change_password.php @@ -13,8 +13,12 @@ Form->control('password', [ 'type' => 'password', 'required' => true, + 'id' => 'new-password', 'label' => __d('cake_d_c/users', 'New password')]); ?> + + User->addPasswordMeter() ?> + Form->control('password_confirm', [ 'type' => 'password', 'required' => true, @@ -22,6 +26,6 @@ ?> - Form->button(__d('cake_d_c/users', 'Submit')); ?> + Form->button(__d('cake_d_c/users', 'Submit'), ['id' => 'btn-submit']); ?> Form->end() ?> - \ No newline at end of file + diff --git a/templates/Users/profile.php b/templates/Users/profile.php index aa4759fb7..30aa97094 100644 --- a/templates/Users/profile.php +++ b/templates/Users/profile.php @@ -32,7 +32,7 @@

username) ?>

email) ?>

- User->socialConnectLinkList($user->social_accounts) ?> + User->socialConnectLinkList($user->social_accounts ?? []) ?> social_accounts)): ?> diff --git a/templates/Users/register.php b/templates/Users/register.php index 1216b4599..cad1cc40a 100644 --- a/templates/Users/register.php +++ b/templates/Users/register.php @@ -19,7 +19,10 @@ Form->control('username', ['label' => __d('cake_d_c/users', 'Username')]); echo $this->Form->control('email', ['label' => __d('cake_d_c/users', 'Email')]); - echo $this->Form->control('password', ['label' => __d('cake_d_c/users', 'Password')]); + echo $this->Form->control('password', ['label' => __d('cake_d_c/users', 'Password'), 'id' => 'new-password']); + if (Configure::read('Users.passwordMeter')) { + echo $this->User->addPasswordMeter(); + } echo $this->Form->control('password_confirm', [ 'required' => true, 'type' => 'password', @@ -35,6 +38,6 @@ } ?> - User->button(__d('cake_d_c/users', 'Submit')) ?> + User->button(__d('cake_d_c/users', 'Submit'), ['id' => 'btn-submit']) ?> Form->end() ?> diff --git a/tests/TestCase/Controller/Traits/Integration/PasswordManagementTraitIntegrationTest.php b/tests/TestCase/Controller/Traits/Integration/PasswordManagementTraitIntegrationTest.php index f7b082f13..6ddf61e93 100644 --- a/tests/TestCase/Controller/Traits/Integration/PasswordManagementTraitIntegrationTest.php +++ b/tests/TestCase/Controller/Traits/Integration/PasswordManagementTraitIntegrationTest.php @@ -80,7 +80,7 @@ public function testRequestResetPasswordPostValidEmail() $this->assertResponseContains('Please enter the new password'); $this->assertResponseContains('assertResponseContains('assertResponseContains(''); + $this->assertResponseContains(''); $this->post('/users/change-password', [ 'password' => '9080706050', diff --git a/tests/TestCase/Controller/Traits/Integration/RegisterTraitIntegrationTest.php b/tests/TestCase/Controller/Traits/Integration/RegisterTraitIntegrationTest.php index afa4a15bb..5e27ef5ea 100644 --- a/tests/TestCase/Controller/Traits/Integration/RegisterTraitIntegrationTest.php +++ b/tests/TestCase/Controller/Traits/Integration/RegisterTraitIntegrationTest.php @@ -43,13 +43,13 @@ public function testRegister() $this->assertResponseContains('Add User'); $this->assertResponseContains('assertResponseContains('assertResponseContains('assertResponseContains('assertResponseContains('assertResponseContains('assertResponseContains('assertResponseContains('assertResponseContains(''); - $this->assertResponseContains(''); + $this->assertResponseContains(''); } /** @@ -78,13 +78,13 @@ public function testRegisterPostWithErrors() $this->assertResponseContains('Add User'); $this->assertResponseContains('assertResponseContains('assertResponseContains('assertResponseContains('assertResponseContains('assertResponseContains('assertResponseContains('assertResponseContains('assertResponseContains(''); - $this->assertResponseContains(''); + $this->assertResponseContains(''); } /** diff --git a/tests/TestCase/Controller/Traits/Integration/SimpleCrudTraitIntegrationTest.php b/tests/TestCase/Controller/Traits/Integration/SimpleCrudTraitIntegrationTest.php index 6965f9c6a..9a35d74b3 100644 --- a/tests/TestCase/Controller/Traits/Integration/SimpleCrudTraitIntegrationTest.php +++ b/tests/TestCase/Controller/Traits/Integration/SimpleCrudTraitIntegrationTest.php @@ -83,7 +83,7 @@ public function testCrud() $this->assertResponseContains('
'); $this->assertResponseContains('assertResponseContains('assertResponseContains(''); + $this->assertResponseContains(''); $this->enableSecurityToken(); $this->post('/users/change-password/00000000-0000-0000-0000-000000000005', [ diff --git a/webroot/js/pswmeter.js b/webroot/js/pswmeter.js new file mode 100644 index 000000000..fa9a3c28b --- /dev/null +++ b/webroot/js/pswmeter.js @@ -0,0 +1,150 @@ +/** + * PSWMeter + * @author pascualmj + * @see https://github.com/pascualmj/pswmeter + */ + +/** + * + * @param opts + * @returns {{getScore: (function(): number), containerElement: HTMLElement}} + */ +function passwordStrengthMeter(opts) { + + // Add styles inside body + const customStyles = document.createElement('style') + document.body.prepend(customStyles) + customStyles.innerHTML = ` + ${opts.containerElement} { + height: ${opts.height || 4}px; + background-color: #eee; + position: relative; + overflow: hidden; + border-radius: ${opts.borderRadius ? opt.borderRadius.toString() : 2}px; + } + ${opts.containerElement} .password-strength-meter-score { + height: inherit; + width: 0%; + transition: .3s ease-in-out; + background: ${opts.colorScore1 || '#ff7700'}; + } + ${opts.containerElement} .password-strength-meter-score.psms-25 {width: 25%; background: ${opts.colorScore1 || '#ff7700'};} + ${opts.containerElement} .password-strength-meter-score.psms-50 {width: 50%; background: ${opts.colorScore2 || '#ffff00'};} + ${opts.containerElement} .password-strength-meter-score.psms-75 {width: 75%; background: ${opts.colorScore3 || '#aeff00'};} + ${opts.containerElement} .password-strength-meter-score.psms-100 {width: 100%; background: ${opts.colorScore4 || '#00ff00'};}` + + // Container Element + const containerElement = document.getElementById(opts.containerElement.slice(1)) + containerElement.classList.add('password-strength-meter') + + // Score Bar + let scoreBar = document.createElement('div') + scoreBar.classList.add('password-strength-meter-score') + + // Append score bar to container element + containerElement.appendChild(scoreBar) + + // Password input + const passwordInput = document.getElementById(opts.passwordInput.slice(1)) + let passwordInputValue = '' + passwordInput.addEventListener('keyup', function() { + passwordInputValue = this.value + checkPassword() + }) + + // Chosen Min Length + let pswMinLength = opts.pswMinLength || 8 + + // Score Message + let scoreMessage = opts.showMessage ? document.getElementById(opts.messageContainer.slice(1)) : null + let messagesList = opts.messagesList === undefined ? ['Empty password', 'Too simple', 'Simple', 'That\'s OK', 'Great password!'] : opts.messagesList + if (scoreMessage) { scoreMessage.textContent = messagesList[0] || 'Empty password'} + + // Check Password Function + function checkPassword() { + + let score = getScore() + updateScore(score) + + } + + // Get Score Function + function getScore() { + + let score = 0 + + let regexLower = new RegExp('(?=.*[a-z])') + let regexUpper = new RegExp('(?=.*[A-Z])') + let regexDigits = new RegExp('(?=.*[0-9])') + // For length score print user selection or default value + let regexLength = new RegExp('(?=.{' + pswMinLength + ',})') + + if (passwordInputValue.match(regexLower)) { ++score } + if (passwordInputValue.match(regexUpper)) { ++score } + if (passwordInputValue.match(regexDigits)) { ++score } + if (passwordInputValue.match(regexLength)) { ++score } + + if (score === 0 && passwordInputValue.length > 0) { ++score } + + return score + + } + + // Show Score Function + function updateScore(score) { + switch(score) { + case 1: + scoreBar.className = 'password-strength-meter-score psms-25' + if (scoreMessage) { scoreMessage.textContent = messagesList[1] || 'Too simple' } + containerElement.dispatchEvent(new Event('onScore1', { bubbles: true })) + break + case 2: + scoreBar.className = 'password-strength-meter-score psms-50' + if (scoreMessage) { scoreMessage.textContent = messagesList[2] || 'Simple' } + containerElement.dispatchEvent(new Event('onScore2', { bubbles: true })) + break + case 3: + scoreBar.className = 'password-strength-meter-score psms-75' + if (scoreMessage) { scoreMessage.textContent = messagesList[3] || 'That\'s OK' } + containerElement.dispatchEvent(new Event('onScore3', { bubbles: true })) + break + case 4: + scoreBar.className = 'password-strength-meter-score psms-100' + if (scoreMessage) { scoreMessage.textContent = messagesList[4] || 'Great password!' } + containerElement.dispatchEvent(new Event('onScore4', { bubbles: true })) + break + default: + scoreBar.className = 'password-strength-meter-score' + if (scoreMessage) { scoreMessage.textContent = messagesList[0] || 'No data' } + containerElement.dispatchEvent(new Event('onScore0', { bubbles: true })) + } + } + + // Return anonymous object with properties + return { + containerElement, + getScore + } + +} +window.addEventListener("load",init); +function init() { + // Run pswmeter with options + const myPassMeter = passwordStrengthMeter({ + containerElement: '#pswmeter', + passwordInput: '#new-password', + showMessage: true, + messageContainer: '#pswmeter-message' + }); + for (let i = 0; i < 4; i++) { + myPassMeter.containerElement.addEventListener('onScore' + i, function() { + document.getElementById("btn-submit").disabled = i < requiredScore; + }) + } + + document.getElementById("new-password").dispatchEvent(new Event("keyup")); + if (myPassMeter.getScore < requiredScore) { + document.getElementById("btn-submit").disabled = true; + } + +} From 36d093b563c0b51ed1e22000dbd57976b4423e86 Mon Sep 17 00:00:00 2001 From: Antonio Reveron Date: Thu, 25 Apr 2024 15:57:03 +0100 Subject: [PATCH 03/29] add userForeignKeyField to default config in LockoutHandler --- Docs/Documentation/Authentication.md | 1 + src/Identifier/PasswordLockout/LockoutHandler.php | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Docs/Documentation/Authentication.md b/Docs/Documentation/Authentication.md index 641de4289..2aa415834 100644 --- a/Docs/Documentation/Authentication.md +++ b/Docs/Documentation/Authentication.md @@ -141,6 +141,7 @@ Additionally, you can set number of attempts until lock, lockout time, time wind 'failedPasswordAttemptsModel' => 'CakeDC/Users.FailedPasswordAttempts', 'userLockoutField' => 'lockout_time',//Field in user entity used to lock the user. 'usersModel' => 'Users', + 'userForeignKeyField' => 'user_id', //Field defined in the 'failed_password_attempts' table as foreignKey of the model Users. ], ``` diff --git a/src/Identifier/PasswordLockout/LockoutHandler.php b/src/Identifier/PasswordLockout/LockoutHandler.php index 5fc0180ce..ab8f23081 100644 --- a/src/Identifier/PasswordLockout/LockoutHandler.php +++ b/src/Identifier/PasswordLockout/LockoutHandler.php @@ -14,10 +14,10 @@ namespace CakeDC\Users\Identifier\PasswordLockout; use Cake\Core\InstanceConfigTrait; +use Cake\Datasource\EntityInterface; use Cake\I18n\DateTime; use Cake\ORM\Locator\LocatorAwareTrait; use Cake\ORM\Query\SelectQuery; -use CakeDC\Users\Model\Entity\FailedPasswordAttempt; class LockoutHandler implements LockoutHandlerInterface { @@ -36,6 +36,7 @@ class LockoutHandler implements LockoutHandlerInterface 'failedPasswordAttemptsModel' => 'CakeDC/Users.FailedPasswordAttempts', 'userLockoutField' => 'lockout_time', 'usersModel' => 'Users', + 'userForeignKeyField' => 'user_id', ]; /** @@ -86,7 +87,7 @@ public function newFail(string|int $id): void { $timeWindow = $this->getTimeWindow(); $Table = $this->getTable(); - $entity = $Table->newEntity(['user_id' => $id]); + $entity = $Table->newEntity([$this->getConfig('userForeignKeyField') => $id]); $Table->saveOrFail($entity); $Table->deleteAll($Table->query()->newExpr()->lt('created', $timeWindow)); } @@ -96,7 +97,7 @@ public function newFail(string|int $id): void */ protected function getTable(): \Cake\ORM\Table { - return $this->getTableLocator()->get('CakeDC/Users.FailedPasswordAttempts'); + return $this->getTableLocator()->get($this->getConfig('failedPasswordAttemptsModel')); } /** @@ -112,9 +113,9 @@ protected function getAttemptsCount(string|int $id, DateTime $timeWindow): int /** * @param string|int $id * @param \Cake\I18n\DateTime $timeWindow - * @return \CakeDC\Users\Model\Entity\FailedPasswordAttempt + * @return \Cake\Datasource\EntityInterface */ - protected function getLastAttempt(int|string $id, DateTime $timeWindow): FailedPasswordAttempt + protected function getLastAttempt(int|string $id, DateTime $timeWindow): EntityInterface { /** * @var \CakeDC\Users\Model\Entity\FailedPasswordAttempt $attempt @@ -135,7 +136,7 @@ protected function getAttemptsQuery(int|string $id, DateTime $timeWindow): Selec return $query ->where([ - 'user_id' => $id, + $this->getConfig('userForeignKeyField') => $id, $query->newExpr()->gte('created', $timeWindow), ]) ->orderByDesc('created'); From 967dc9b8d5399fc5a30084017c65a6617d8c7693 Mon Sep 17 00:00:00 2001 From: Antonio Reveron Date: Tue, 30 Apr 2024 13:20:02 +0100 Subject: [PATCH 04/29] fixed phpcs --- src/Identifier/PasswordLockout/LockoutHandler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Identifier/PasswordLockout/LockoutHandler.php b/src/Identifier/PasswordLockout/LockoutHandler.php index ab8f23081..f91ead084 100644 --- a/src/Identifier/PasswordLockout/LockoutHandler.php +++ b/src/Identifier/PasswordLockout/LockoutHandler.php @@ -74,9 +74,9 @@ public function isUnlocked(\ArrayAccess|array $identity): bool $lastAttempt = $this->getLastAttempt($identity['id'], $timeWindow); $this->getTableLocator() ->get($this->getConfig('usersModel')) - ->updateAll([$lockoutField => $lastAttempt->created], ['id' => $identity['id']]); + ->updateAll([$lockoutField => $lastAttempt->get('created')], ['id' => $identity['id']]); - return $this->checkLockoutTime($lastAttempt->created); + return $this->checkLockoutTime($lastAttempt->get('created')); } /** From 118afa3a76a43c26baace5506136aa42fd01147e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20M=2E=20Gonz=C3=A1lez=20Mart=C3=ADn?= Date: Wed, 8 May 2024 09:46:54 +0100 Subject: [PATCH 05/29] Update .semver --- .semver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.semver b/.semver index bd7c75ac5..97117f7ac 100644 --- a/.semver +++ b/.semver @@ -1,5 +1,5 @@ --- :major: 14 :minor: 1 -:patch: 0 +:patch: 1 :special: '' From 21184367efe250ce96300baade44335c7aa73b00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20M=2E=20Gonz=C3=A1lez=20Mart=C3=ADn?= Date: Wed, 8 May 2024 09:47:54 +0100 Subject: [PATCH 06/29] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 418a49658..2aead58cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ Changelog ========= Releases for CakePHP 5 ------------- +* 14.1.1 + * Add config option to customize the user foreign key field in LockoutHandler * 14.1 * New feature "Account lockout policy" * 14.0 From 33eca210c16cbfd1677dc662b550dcd7b9767132 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20M=2E=20Gonz=C3=A1lez=20Mart=C3=ADn?= Date: Wed, 8 May 2024 10:12:30 +0100 Subject: [PATCH 07/29] Update .semver --- .semver | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.semver b/.semver index 97117f7ac..a44d34328 100644 --- a/.semver +++ b/.semver @@ -1,5 +1,5 @@ --- :major: 14 -:minor: 1 -:patch: 1 +:minor: 2 +:patch: 0 :special: '' From 556f13fde2c1f8818cf28cf65b336b9bd26e659b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20M=2E=20Gonz=C3=A1lez=20Mart=C3=ADn?= Date: Wed, 8 May 2024 10:14:22 +0100 Subject: [PATCH 08/29] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2aead58cc..9373b9c7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ Changelog ========= Releases for CakePHP 5 ------------- +* 14.2.0 + * Add password meter to display password quality + * Add integration with google reCaptcha v3, keep default using v2 * 14.1.1 * Add config option to customize the user foreign key field in LockoutHandler * 14.1 From f63c1706b78f9a144770ab262fcb931d5a8768bb Mon Sep 17 00:00:00 2001 From: Alejandro Ibarra Date: Thu, 9 May 2024 17:09:31 +0200 Subject: [PATCH 09/29] Improve password meter config options and docs --- Docs/Documentation/Configuration.md | 19 ++++++ config/users.php | 8 +++ src/View/Helper/UserHelper.php | 14 +++- templates/Users/register.php | 2 +- webroot/js/pswmeter.js | 99 +++++++++++++++-------------- 5 files changed, 89 insertions(+), 53 deletions(-) diff --git a/Docs/Documentation/Configuration.md b/Docs/Documentation/Configuration.md index 64ee6a8b6..a6bcda75e 100644 --- a/Docs/Documentation/Configuration.md +++ b/Docs/Documentation/Configuration.md @@ -65,6 +65,25 @@ Note you'll need to add google/recaptcha to your composer.json file. $ composer require google/recaptcha:@stable ``` +Configuration for Password Meter +--------------------- +Password meter is enabled by default but you can disable it or change config options adding this to your config/users.php file: + +```php +'Users.passwordMeter.enabled' => true, //enable or disable password meter. Defaults to true +'Users.passwordMeter.requiredScore' => 3, //int value from 1 to 4 (25%,50%,75%,100%). Defaults to 3 +'Users.passwordMeter.messagesList' => ['Empty password', 'Too simple', 'Simple', 'That\'s OK', 'Great password!'], //Messages for each password level (0%,25%,50%,75%,100%) +'Users.passwordMeter.pswMinLength' => 8, //Password min length, defaults to 8 +'Users.passwordMeter.showMessage' => true, //shows password message +``` + +Note the score is calculated based on the following rules: + +* If you include a lower single character and an upper one ([a-zA-Z]) it increases the score by 1 +* If you include an special single character it increases the score by 1 +* If you include a digit it increases the score by 1 +* If you reaches the `pswMinLength` it increases the score by 1 + Configuration options --------------------- diff --git a/config/users.php b/config/users.php index 860508b0a..35c99eb43 100644 --- a/config/users.php +++ b/config/users.php @@ -79,8 +79,16 @@ 'login' => false, ], 'passwordMeter' => [ + //enable or disable password meter 'enabled' => true, + //int value from 1 to 4 (25%,50%,75%,100%). Defaults to 3 'requiredScore' => 3, + //Messages for each password level (0%,25%,50%,75%,100%) + 'messagesList' => ['Empty password', 'Too simple', 'Simple', 'That\'s OK', 'Great password!'], + //Password min length + 'pswMinLength' => 8, + //shows message for password score + 'showMessage' => true, ], 'Tos' => [ // determines if the user should include tos accepted diff --git a/src/View/Helper/UserHelper.php b/src/View/Helper/UserHelper.php index dd3d500e1..e34578d95 100644 --- a/src/View/Helper/UserHelper.php +++ b/src/View/Helper/UserHelper.php @@ -154,7 +154,7 @@ public function addReCaptchaScript(): void /** * @return void */ - public function addPasswordMeterStript(): void + public function addPasswordMeterScript(): void { $this->Html->script('CakeDC/Users.pswmeter', [ 'block' => 'script', @@ -166,9 +166,17 @@ public function addPasswordMeterStript(): void */ public function addPasswordMeter(): string { - $this->addPasswordMeterStript(); + $this->addPasswordMeterScript(); $requiredScore = Configure::read('Users.passwordMeter.requiredScore', 3); - $script = $this->Html->scriptBlock("const requiredScore = $requiredScore", ['defer' => true]); + $messagesList = json_encode(Configure::read('Users.passwordMeter.messagesList', ['Empty password', 'Too simple', 'Simple', 'That\'s OK', 'Great password!'])); + $pswMinLength = Configure::read('Users.passwordMeter.pswMinLength', 8); + $showMessage = (string)Configure::read('Users.passwordMeter.showMessage', true); + $script = $this->Html->scriptBlock(" + const requiredScore = $requiredScore; + const messagesList = $messagesList; + const pswMinLength = $pswMinLength; + const showMessage = $showMessage; + ", ['defer' => true]); return $this->Html->tag('div', '', ['id' => 'pswmeter']) . $this->Html->tag('div', '', ['id' => 'pswmeter-message']) . $script; diff --git a/templates/Users/register.php b/templates/Users/register.php index cad1cc40a..4f879e7d9 100644 --- a/templates/Users/register.php +++ b/templates/Users/register.php @@ -20,7 +20,7 @@ echo $this->Form->control('username', ['label' => __d('cake_d_c/users', 'Username')]); echo $this->Form->control('email', ['label' => __d('cake_d_c/users', 'Email')]); echo $this->Form->control('password', ['label' => __d('cake_d_c/users', 'Password'), 'id' => 'new-password']); - if (Configure::read('Users.passwordMeter')) { + if (Configure::read('Users.passwordMeter.enabled')) { echo $this->User->addPasswordMeter(); } echo $this->Form->control('password_confirm', [ diff --git a/webroot/js/pswmeter.js b/webroot/js/pswmeter.js index fa9a3c28b..4bbe334e0 100644 --- a/webroot/js/pswmeter.js +++ b/webroot/js/pswmeter.js @@ -26,12 +26,12 @@ function passwordStrengthMeter(opts) { height: inherit; width: 0%; transition: .3s ease-in-out; - background: ${opts.colorScore1 || '#ff7700'}; + background: ${opts.colorScore1 || '#ff0000'}; } - ${opts.containerElement} .password-strength-meter-score.psms-25 {width: 25%; background: ${opts.colorScore1 || '#ff7700'};} - ${opts.containerElement} .password-strength-meter-score.psms-50 {width: 50%; background: ${opts.colorScore2 || '#ffff00'};} - ${opts.containerElement} .password-strength-meter-score.psms-75 {width: 75%; background: ${opts.colorScore3 || '#aeff00'};} - ${opts.containerElement} .password-strength-meter-score.psms-100 {width: 100%; background: ${opts.colorScore4 || '#00ff00'};}` + ${opts.containerElement} .password-strength-meter-score.psms-25 {width: 25%; background: ${opts.colorScore1 || '#ff0000'};} + ${opts.containerElement} .password-strength-meter-score.psms-50 {width: 50%; background: ${opts.colorScore2 || '#fff400'};} + ${opts.containerElement} .password-strength-meter-score.psms-75 {width: 75%; background: ${opts.colorScore3 || '#a3ff00'};} + ${opts.containerElement} .password-strength-meter-score.psms-100 {width: 100%; background: ${opts.colorScore4 || '#2cba00'};}` // Container Element const containerElement = document.getElementById(opts.containerElement.slice(1)) @@ -63,8 +63,8 @@ function passwordStrengthMeter(opts) { // Check Password Function function checkPassword() { - let score = getScore() - updateScore(score) + let score = getScore() + updateScore(score) } @@ -73,51 +73,50 @@ function passwordStrengthMeter(opts) { let score = 0 - let regexLower = new RegExp('(?=.*[a-z])') - let regexUpper = new RegExp('(?=.*[A-Z])') - let regexDigits = new RegExp('(?=.*[0-9])') - // For length score print user selection or default value - let regexLength = new RegExp('(?=.{' + pswMinLength + ',})') + let regexLower = new RegExp('(?=.*[a-z])') + let regexUpper = new RegExp('(?=.*[A-Z])') + let regexDigits = new RegExp('(?=.*[0-9])') + let regexSymbols = new RegExp('(?=.*[^a-zA-Z\d\s])') + // For length score print user selection or default value + let regexLength = new RegExp('(?=.{' + pswMinLength + ',})') - if (passwordInputValue.match(regexLower)) { ++score } - if (passwordInputValue.match(regexUpper)) { ++score } - if (passwordInputValue.match(regexDigits)) { ++score } - if (passwordInputValue.match(regexLength)) { ++score } - - if (score === 0 && passwordInputValue.length > 0) { ++score } - - return score + if (passwordInputValue.match(regexLower) && passwordInputValue.match(regexUpper)) { ++score } + if (passwordInputValue.match(regexSymbols)) { ++score } + if (passwordInputValue.match(regexDigits)) { ++score } + if (passwordInputValue.match(regexLength)) { ++score } + if (score === 0 && passwordInputValue.length > 0) { ++score } + return score } // Show Score Function function updateScore(score) { - switch(score) { - case 1: - scoreBar.className = 'password-strength-meter-score psms-25' - if (scoreMessage) { scoreMessage.textContent = messagesList[1] || 'Too simple' } - containerElement.dispatchEvent(new Event('onScore1', { bubbles: true })) - break - case 2: - scoreBar.className = 'password-strength-meter-score psms-50' - if (scoreMessage) { scoreMessage.textContent = messagesList[2] || 'Simple' } - containerElement.dispatchEvent(new Event('onScore2', { bubbles: true })) - break - case 3: - scoreBar.className = 'password-strength-meter-score psms-75' - if (scoreMessage) { scoreMessage.textContent = messagesList[3] || 'That\'s OK' } - containerElement.dispatchEvent(new Event('onScore3', { bubbles: true })) - break - case 4: - scoreBar.className = 'password-strength-meter-score psms-100' - if (scoreMessage) { scoreMessage.textContent = messagesList[4] || 'Great password!' } - containerElement.dispatchEvent(new Event('onScore4', { bubbles: true })) - break - default: - scoreBar.className = 'password-strength-meter-score' - if (scoreMessage) { scoreMessage.textContent = messagesList[0] || 'No data' } - containerElement.dispatchEvent(new Event('onScore0', { bubbles: true })) - } + switch(score) { + case 1: + scoreBar.className = 'password-strength-meter-score psms-25' + if (scoreMessage) { scoreMessage.textContent = messagesList[1] || 'Too simple' } + containerElement.dispatchEvent(new Event('onScore1', { bubbles: true })) + break + case 2: + scoreBar.className = 'password-strength-meter-score psms-50' + if (scoreMessage) { scoreMessage.textContent = messagesList[2] || 'Simple' } + containerElement.dispatchEvent(new Event('onScore2', { bubbles: true })) + break + case 3: + scoreBar.className = 'password-strength-meter-score psms-75' + if (scoreMessage) { scoreMessage.textContent = messagesList[3] || 'That\'s OK' } + containerElement.dispatchEvent(new Event('onScore3', { bubbles: true })) + break + case 4: + scoreBar.className = 'password-strength-meter-score psms-100' + if (scoreMessage) { scoreMessage.textContent = messagesList[4] || 'Great password!' } + containerElement.dispatchEvent(new Event('onScore4', { bubbles: true })) + break + default: + scoreBar.className = 'password-strength-meter-score' + if (scoreMessage) { scoreMessage.textContent = messagesList[0] || 'No data' } + containerElement.dispatchEvent(new Event('onScore0', { bubbles: true })) + } } // Return anonymous object with properties @@ -133,10 +132,12 @@ function init() { const myPassMeter = passwordStrengthMeter({ containerElement: '#pswmeter', passwordInput: '#new-password', - showMessage: true, - messageContainer: '#pswmeter-message' + showMessage: showMessage, + messageContainer: '#pswmeter-message', + messagesList: messagesList, + pswMinLength: pswMinLength, }); - for (let i = 0; i < 4; i++) { + for (let i = 0; i <= 4; i++) { myPassMeter.containerElement.addEventListener('onScore' + i, function() { document.getElementById("btn-submit").disabled = i < requiredScore; }) From 8c0e428fbf1a22a3f77b3da9caed2d4fc9a75763 Mon Sep 17 00:00:00 2001 From: Alejandro Ibarra Date: Fri, 10 May 2024 10:46:48 +0200 Subject: [PATCH 10/29] Improve docs and translations. Fix password meter --- Docs/Documentation/Configuration.md | 4 +- README.md | 30 +- config/bootstrap.php | 2 +- config/users.php | 10 +- resources/locales/cake_d_c_users.pot | 909 +++++++++--------- .../Traits/PasswordManagementTrait.php | 10 +- src/Controller/Traits/RegisterTrait.php | 4 +- src/Controller/Traits/UserValidationTrait.php | 5 +- .../PasswordLockout/LockoutHandler.php | 21 +- src/Identifier/PasswordLockoutIdentifier.php | 7 +- src/Model/Behavior/SocialAccountBehavior.php | 6 +- src/Model/Behavior/SocialBehavior.php | 5 +- src/Plugin.php | 3 +- src/View/Helper/UserHelper.php | 11 +- src/Webauthn/AuthenticateAdapter.php | 7 +- src/Webauthn/BaseAdapter.php | 5 +- src/Webauthn/PublicKeyCredentialLoader.php | 6 +- src/Webauthn/RegisterAdapter.php | 2 +- templates/Users/change_password.php | 2 +- 19 files changed, 567 insertions(+), 482 deletions(-) diff --git a/Docs/Documentation/Configuration.md b/Docs/Documentation/Configuration.md index a6bcda75e..ecb3e38e5 100644 --- a/Docs/Documentation/Configuration.md +++ b/Docs/Documentation/Configuration.md @@ -71,9 +71,9 @@ Password meter is enabled by default but you can disable it or change config opt ```php 'Users.passwordMeter.enabled' => true, //enable or disable password meter. Defaults to true -'Users.passwordMeter.requiredScore' => 3, //int value from 1 to 4 (25%,50%,75%,100%). Defaults to 3 +'Users.passwordMeter.requiredScore' => 1, //int value from 1 to 4 (25%,50%,75%,100%). Defaults to 1 'Users.passwordMeter.messagesList' => ['Empty password', 'Too simple', 'Simple', 'That\'s OK', 'Great password!'], //Messages for each password level (0%,25%,50%,75%,100%) -'Users.passwordMeter.pswMinLength' => 8, //Password min length, defaults to 8 +'Users.passwordMeter.pswMinLength' => 8, //Password min length, defaults to 8. It won't affect users validation in backend 'Users.passwordMeter.showMessage' => true, //shows password message ``` diff --git a/README.md b/README.md index aab556972..72b69e4e2 100644 --- a/README.md +++ b/README.md @@ -10,20 +10,20 @@ CakeDC Users Plugin Versions and branches --------------------- -| CakePHP | CakeDC Users Plugin | Tag | Notes | -|:--------------:|:----------------------------------------------------------:|:-----------------:| :---- | -| ^5.0 | [14.1](https://github.com/cakedc/users/tree/14.next-cake5) | 14.next-cake5-dev | beta | -| ^4.5 | [13.0](https://github.com/cakedc/users/tree/13.next-cake4) | 13.0.1 | stable | -| ^5.0 | [12.0](https://github.com/cakedc/users/tree/12.next-cake5) | 12.0 | beta | -| ^4.3 | [11.0](https://github.com/cakedc/users/tree/11.next-cake4) | 11.1.0 | stable | -| ^4.0 | [9.0](https://github.com/cakedc/users/tree/9.next) | 9.0.5 | stable | -| ^3.7 <4.0 | [8.5](https://github.com/cakedc/users/tree/8.next) | 8.5.1 | stable | -| ^3.7 <4.0 | [develop](https://github.com/cakedc/users/tree/develop) | - | unstable | -| 3.6 | [8.1](https://github.com/cakedc/users/tree/8.1.0) | 8.1.0 | stable | -| 3.5 | [6.x](https://github.com/cakedc/users/tree/6.x) | 6.0.1 | stable | -| 3.4 | [5.x](https://github.com/cakedc/users/tree/5.x) | 5.2.0 | stable | -| >=3.2.9 <3.4.0 | [4.x](https://github.com/cakedc/users/tree/4.x) | 4.2.1 | stable | -| ^2.10 | [2.x](https://github.com/cakedc/users/tree/2.x) | 2.2.0 |stable | +| CakePHP | CakeDC Users Plugin | Tag | Notes | +|:--------------:|:----------------------------------------------------------:|:------:|:---------| +| ^5.0 | [14.2](https://github.com/cakedc/users/tree/14.next-cake5) | 14.2.1 | stable | +| ^4.5 | [13.0](https://github.com/cakedc/users/tree/13.next-cake4) | 13.0.1 | stable | +| ^5.0 | [12.0](https://github.com/cakedc/users/tree/12.next-cake5) | 12.0 | beta | +| ^4.3 | [11.0](https://github.com/cakedc/users/tree/11.next-cake4) | 11.1.0 | stable | +| ^4.0 | [9.0](https://github.com/cakedc/users/tree/9.next) | 9.0.5 | stable | +| ^3.7 <4.0 | [8.5](https://github.com/cakedc/users/tree/8.next) | 8.5.1 | stable | +| ^3.7 <4.0 | [develop](https://github.com/cakedc/users/tree/develop) | - | unstable | +| 3.6 | [8.1](https://github.com/cakedc/users/tree/8.1.0) | 8.1.0 | stable | +| 3.5 | [6.x](https://github.com/cakedc/users/tree/6.x) | 6.0.1 | stable | +| 3.4 | [5.x](https://github.com/cakedc/users/tree/5.x) | 5.2.0 | stable | +| >=3.2.9 <3.4.0 | [4.x](https://github.com/cakedc/users/tree/4.x) | 4.2.1 | stable | +| ^2.10 | [2.x](https://github.com/cakedc/users/tree/2.x) | 2.2.0 | stable | The **Users** plugin covers the following features: @@ -36,6 +36,8 @@ The **Users** plugin covers the following features: * Admin management * One-Time Password for Two-Factor Authentication * Webauthn for Two-Factor Authentication (Yubico Key compatible) +* reCaptcha v3 (14.2 only) and v2 supported in all versions +* Password Meter The plugin is here to provide users related features following 2 approaches: diff --git a/config/bootstrap.php b/config/bootstrap.php index d78acc8b7..ea91386c7 100644 --- a/config/bootstrap.php +++ b/config/bootstrap.php @@ -36,6 +36,6 @@ ]; foreach ($oldConfigs as $configKey) { if (Configure::check($configKey)) { - trigger_error(__("Users plugin configuration key \"{0}\" was removed, please check migration guide https://github.com/CakeDC/users/blob/master/Docs/Documentation/Migration/8.x-9.0.md", $configKey)); + trigger_error(__d('cake_d_c/users', "Users plugin configuration key \"{0}\" was removed, please check migration guide https://github.com/CakeDC/users/blob/master/Docs/Documentation/Migration/8.x-9.0.md", $configKey)); } } diff --git a/config/users.php b/config/users.php index 35c99eb43..46c07db42 100644 --- a/config/users.php +++ b/config/users.php @@ -82,9 +82,15 @@ //enable or disable password meter 'enabled' => true, //int value from 1 to 4 (25%,50%,75%,100%). Defaults to 3 - 'requiredScore' => 3, + 'requiredScore' => 1, //Messages for each password level (0%,25%,50%,75%,100%) - 'messagesList' => ['Empty password', 'Too simple', 'Simple', 'That\'s OK', 'Great password!'], + 'messagesList' => [ + __d('cake_d_c/users', 'Empty password'), + __d('cake_d_c/users', 'Too simple'), + __d('cake_d_c/users','Simple'), + __d('cake_d_c/users', 'That\'s OK'), + __d('cake_d_c/users', 'Great password!') + ], //Password min length 'pswMinLength' => 8, //shows message for password score diff --git a/resources/locales/cake_d_c_users.pot b/resources/locales/cake_d_c_users.pot index c2992ab07..267142b12 100644 --- a/resources/locales/cake_d_c_users.pot +++ b/resources/locales/cake_d_c_users.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" -"POT-Creation-Date: 2022-03-11 13:46+0100\n" +"POT-Creation-Date: 2024-05-10 08:44+0000\n" "PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n" "Last-Translator: NAME \n" "Language-Team: LANGUAGE \n" @@ -14,907 +14,934 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -#: src/Controller/SocialAccountsController.php:50 -msgid "Account validated successfully" +#: ./vendor/cakedc/users/src/Command/Logic/ChangeUserActiveTrait.php:25 +#: ./vendor/cakedc/users/src/Command/UsersChangeApiTokenCommand.php:46 +#: ./vendor/cakedc/users/src/Command/UsersChangeRoleCommand.php:46 +#: ./vendor/cakedc/users/src/Command/UsersDeleteUserCommand.php:42 +#: ./vendor/cakedc/users/src/Command/UsersResetPasswordCommand.php:46 +msgid "Please enter a username." msgstr "" -#: src/Controller/SocialAccountsController.php:52 -msgid "Account could not be validated" +#: ./vendor/cakedc/users/src/Command/Logic/CreateUserTrait.php:89 +msgid "Superuser added:" msgstr "" -#: src/Controller/SocialAccountsController.php:55 -msgid "Invalid token and/or social account" +#: ./vendor/cakedc/users/src/Command/Logic/CreateUserTrait.php:91 +msgid "User added:" msgstr "" -#: src/Controller/SocialAccountsController.php:57 -#: src/Controller/SocialAccountsController.php:85 -msgid "Social Account already active" +#: ./vendor/cakedc/users/src/Command/Logic/CreateUserTrait.php:93 +msgid "Id: {0}" msgstr "" -#: src/Controller/SocialAccountsController.php:59 -msgid "Social Account could not be validated" +#: ./vendor/cakedc/users/src/Command/Logic/CreateUserTrait.php:94 +msgid "Username: {0}" msgstr "" -#: src/Controller/SocialAccountsController.php:78 -msgid "Email sent successfully" +#: ./vendor/cakedc/users/src/Command/Logic/CreateUserTrait.php:95 +msgid "Email: {0}" msgstr "" -#: src/Controller/SocialAccountsController.php:80 -msgid "Email could not be sent" +#: ./vendor/cakedc/users/src/Command/Logic/CreateUserTrait.php:96 +msgid "Role: {0}" msgstr "" -#: src/Controller/SocialAccountsController.php:83 -msgid "Invalid account" +#: ./vendor/cakedc/users/src/Command/Logic/CreateUserTrait.php:97 +msgid "Password: {0}" msgstr "" -#: src/Controller/SocialAccountsController.php:87 -msgid "Email could not be resent" +#: ./vendor/cakedc/users/src/Command/Logic/CreateUserTrait.php:99 +msgid "User could not be added:" msgstr "" -#: src/Controller/Traits/LinkSocialTrait.php:56 -msgid "Could not associate account, please try again." +#: ./vendor/cakedc/users/src/Command/Logic/CreateUserTrait.php:102 +msgid "Field: {0} Error: {1}" msgstr "" -#: src/Controller/Traits/LinkSocialTrait.php:80 -msgid "Social account was associated." +#: ./vendor/cakedc/users/src/Command/Logic/UpdateUserTrait.php:29 +msgid "The user was not found." msgstr "" -#: src/Controller/Traits/LoginTrait.php:73 -msgid "You've successfully logged out" +#: ./vendor/cakedc/users/src/Command/UsersActivateUserCommand.php:31 +msgid "Activate a specific user" msgstr "" -#: src/Controller/Traits/OneTimePasswordVerifyTrait.php:75 -msgid "Please enable Google Authenticator first." +#: ./vendor/cakedc/users/src/Command/UsersActivateUserCommand.php:44 +msgid "User was activated: {0}" msgstr "" -#: src/Controller/Traits/OneTimePasswordVerifyTrait.php:90 -msgid "Could not find user data" +#: ./vendor/cakedc/users/src/Command/UsersChangeApiTokenCommand.php:31 +msgid "Change the api token for a specific user" msgstr "" -#: src/Controller/Traits/OneTimePasswordVerifyTrait.php:129 -msgid "Could not verify, please try again" +#: ./vendor/cakedc/users/src/Command/UsersChangeApiTokenCommand.php:49 +msgid "Please enter a token." msgstr "" -#: src/Controller/Traits/OneTimePasswordVerifyTrait.php:161 -msgid "Verification code is invalid. Try again" +#: ./vendor/cakedc/users/src/Command/UsersChangeApiTokenCommand.php:58 +msgid "Api token changed for user: {0}" msgstr "" -#: src/Controller/Traits/PasswordManagementTrait.php:63 -msgid "Changing another user's password is not allowed" +#: ./vendor/cakedc/users/src/Command/UsersChangeApiTokenCommand.php:59 +msgid "New token: {0}" msgstr "" -#: src/Controller/Traits/PasswordManagementTrait.php:77 -#: src/Controller/Traits/PasswordManagementTrait.php:121 -#: src/Controller/Traits/ProfileTrait.php:54 -msgid "User was not found" +#: ./vendor/cakedc/users/src/Command/UsersChangeRoleCommand.php:31 +msgid "Change the role for a specific user" msgstr "" -#: src/Controller/Traits/PasswordManagementTrait.php:105 -#: src/Controller/Traits/PasswordManagementTrait.php:117 -#: src/Controller/Traits/PasswordManagementTrait.php:125 -msgid "Password could not be changed" +#: ./vendor/cakedc/users/src/Command/UsersChangeRoleCommand.php:49 +msgid "Please enter a role." msgstr "" -#: src/Controller/Traits/PasswordManagementTrait.php:113 -msgid "Password has been changed successfully" +#: ./vendor/cakedc/users/src/Command/UsersChangeRoleCommand.php:55 +msgid "Role changed for user: {0}" msgstr "" -#: src/Controller/Traits/PasswordManagementTrait.php:167 -msgid "Please check your email to continue with password reset process" +#: ./vendor/cakedc/users/src/Command/UsersChangeRoleCommand.php:56 +msgid "New role: {0}" msgstr "" -#: src/Controller/Traits/PasswordManagementTrait.php:170 -#: src/Shell/UsersShell.php:286 -msgid "The password token could not be generated. Please try again" +#: ./vendor/cakedc/users/src/Command/UsersDeactivateUserCommand.php:31 +msgid "Deactivate a specific user" msgstr "" -#: src/Controller/Traits/PasswordManagementTrait.php:176 -#: src/Controller/Traits/UserValidationTrait.php:124 -msgid "User {0} was not found" +#: ./vendor/cakedc/users/src/Command/UsersDeactivateUserCommand.php:44 +msgid "User was de-activated: {0}" msgstr "" -#: src/Controller/Traits/PasswordManagementTrait.php:178 -msgid "The user is not active" +#: ./vendor/cakedc/users/src/Command/UsersDeleteUserCommand.php:28 +msgid "Delete a specific user" msgstr "" -#: src/Controller/Traits/PasswordManagementTrait.php:180 -#: src/Controller/Traits/UserValidationTrait.php:119 -#: src/Controller/Traits/UserValidationTrait.php:128 -msgid "Token could not be reset" +#: ./vendor/cakedc/users/src/Command/UsersDeleteUserCommand.php:57 +msgid "The user {0} was not deleted. Please try again" msgstr "" -#: src/Controller/Traits/PasswordManagementTrait.php:204 -msgid "Google Authenticator token was successfully reset" +#: ./vendor/cakedc/users/src/Command/UsersDeleteUserCommand.php:59 +msgid "The user {0} was deleted successfully" msgstr "" -#: src/Controller/Traits/PasswordManagementTrait.php:207 -msgid "Could not reset Google Authenticator" +#: ./vendor/cakedc/users/src/Command/UsersPasswordEmailCommand.php:29 +msgid "Reset the password via email" msgstr "" -#: src/Controller/Traits/ProfileTrait.php:58 -msgid "Not authorized, please login first" +#: ./vendor/cakedc/users/src/Command/UsersPasswordEmailCommand.php:43 +msgid "Please enter a username or email." msgstr "" -#: src/Controller/Traits/RegisterTrait.php:47 -msgid "You must log out to register a new user account" +#: ./vendor/cakedc/users/src/Command/UsersPasswordEmailCommand.php:55 +msgid "Please ask the user to check the email to continue with password reset process" msgstr "" -#: src/Controller/Traits/RegisterTrait.php:86 -#: src/Controller/Traits/RegisterTrait.php:117 -msgid "The user could not be saved" +#: ./vendor/cakedc/users/src/Command/UsersPasswordEmailCommand.php:61 +msgid "The password token could not be generated. Please try again" msgstr "" -#: src/Controller/Traits/RegisterTrait.php:103 -#: src/Loader/LoginComponentLoader.php:33 -msgid "Invalid reCaptcha" +#: ./vendor/cakedc/users/src/Command/UsersResetAllPasswordsCommand.php:29 +msgid "Reset the password for all users" msgstr "" -#: src/Controller/Traits/RegisterTrait.php:151 -msgid "You have registered successfully, please log in" +#: ./vendor/cakedc/users/src/Command/UsersResetAllPasswordsCommand.php:44 +#: ./vendor/cakedc/users/src/Command/UsersResetPasswordCommand.php:49 +msgid "Please enter a password." msgstr "" -#: src/Controller/Traits/RegisterTrait.php:153 -msgid "Please validate your account before log in" +#: ./vendor/cakedc/users/src/Command/UsersResetAllPasswordsCommand.php:48 +msgid "Password changed for all users" msgstr "" -#: src/Controller/Traits/SimpleCrudTrait.php:77 -#: src/Controller/Traits/SimpleCrudTrait.php:107 -msgid "The {0} has been saved" +#: ./vendor/cakedc/users/src/Command/UsersResetAllPasswordsCommand.php:49 +#: ./vendor/cakedc/users/src/Command/UsersResetPasswordCommand.php:56 +msgid "New password: {0}" msgstr "" -#: src/Controller/Traits/SimpleCrudTrait.php:81 -#: src/Controller/Traits/SimpleCrudTrait.php:111 -msgid "The {0} could not be saved" +#: ./vendor/cakedc/users/src/Command/UsersResetPasswordCommand.php:31 +msgid "Reset the password for a specific user" msgstr "" -#: src/Controller/Traits/SimpleCrudTrait.php:131 -msgid "The {0} has been deleted" +#: ./vendor/cakedc/users/src/Command/UsersResetPasswordCommand.php:55 +msgid "Password changed for user: {0}" msgstr "" -#: src/Controller/Traits/SimpleCrudTrait.php:133 -msgid "The {0} could not be deleted" +#: ./vendor/cakedc/users/src/Controller/Component/LoginComponent.php:262 +#: ./vendor/cakedc/users/src/View/Helper/UserHelper.php:133 +msgid "Welcome, {0}" msgstr "" -#: src/Controller/Traits/U2fTrait.php:216 -msgid "U2F requires SSL." +#: ./vendor/cakedc/users/src/Controller/SocialAccountsController.php:50 +msgid "Account validated successfully" msgstr "" -#: src/Controller/Traits/UserValidationTrait.php:49 -msgid "User account validated successfully" +#: ./vendor/cakedc/users/src/Controller/SocialAccountsController.php:52 +msgid "Account could not be validated" msgstr "" -#: src/Controller/Traits/UserValidationTrait.php:51 -msgid "User account could not be validated" +#: ./vendor/cakedc/users/src/Controller/SocialAccountsController.php:55 +msgid "Invalid token and/or social account" msgstr "" -#: src/Controller/Traits/UserValidationTrait.php:54 -msgid "User already active" +#: ./vendor/cakedc/users/src/Controller/SocialAccountsController.php:57 +#: ./vendor/cakedc/users/src/Controller/SocialAccountsController.php:85 +msgid "Social Account already active" msgstr "" -#: src/Controller/Traits/UserValidationTrait.php:60 -msgid "Reset password token was validated successfully" +#: ./vendor/cakedc/users/src/Controller/SocialAccountsController.php:59 +msgid "Social Account could not be validated" msgstr "" -#: src/Controller/Traits/UserValidationTrait.php:68 -msgid "Reset password token could not be validated" +#: ./vendor/cakedc/users/src/Controller/SocialAccountsController.php:78 +msgid "Email sent successfully" msgstr "" -#: src/Controller/Traits/UserValidationTrait.php:72 -msgid "Invalid validation type" +#: ./vendor/cakedc/users/src/Controller/SocialAccountsController.php:80 +msgid "Email could not be sent" msgstr "" -#: src/Controller/Traits/UserValidationTrait.php:75 -msgid "Invalid token or user account already validated" +#: ./vendor/cakedc/users/src/Controller/SocialAccountsController.php:83 +msgid "Invalid account" msgstr "" -#: src/Controller/Traits/UserValidationTrait.php:81 -msgid "Token already expired" +#: ./vendor/cakedc/users/src/Controller/SocialAccountsController.php:87 +msgid "Email could not be resent" msgstr "" -#: src/Controller/Traits/UserValidationTrait.php:114 -msgid "Token has been reset successfully. Please check your email." +#: ./vendor/cakedc/users/src/Controller/Traits/LinkSocialTrait.php:56 +msgid "Could not associate account, please try again." msgstr "" -#: src/Controller/Traits/UserValidationTrait.php:126 -msgid "User {0} is already active" +#: ./vendor/cakedc/users/src/Controller/Traits/LinkSocialTrait.php:80 +msgid "Social account was associated." msgstr "" -#: src/Controller/Traits/Webauthn2faTrait.php:53 -#: src/Controller/Traits/Webauthn2faTrait.php:73 -msgid "User already has configured webauthn2fa" +#: ./vendor/cakedc/users/src/Controller/Traits/LoginTrait.php:73 +msgid "You've successfully logged out" msgstr "" -#: src/Controller/Traits/Webauthn2faTrait.php:77 -#: src/Controller/Traits/Webauthn2faTrait.php:122 -msgid "Register error with webauthn for user id: {0}" +#: ./vendor/cakedc/users/src/Controller/Traits/OneTimePasswordVerifyTrait.php:75 +msgid "Please enable Google Authenticator first." msgstr "" -#: src/Loader/AuthenticationServiceLoader.php:109 -msgid "Property {0}.className should be defined" +#: ./vendor/cakedc/users/src/Controller/Traits/OneTimePasswordVerifyTrait.php:90 +msgid "Could not find user data" msgstr "" -#: src/Loader/LoginComponentLoader.php:31 -msgid "Username or password is incorrect" +#: ./vendor/cakedc/users/src/Controller/Traits/OneTimePasswordVerifyTrait.php:129 +msgid "Could not verify, please try again" msgstr "" -#: src/Loader/LoginComponentLoader.php:52 -msgid "Could not proceed with social account. Please try again" +#: ./vendor/cakedc/users/src/Controller/Traits/OneTimePasswordVerifyTrait.php:161 +msgid "Verification code is invalid. Try again" msgstr "" -#: src/Loader/LoginComponentLoader.php:54 -msgid "Your user has not been validated yet. Please check your inbox for instructions" +#: ./vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:64 +msgid "Changing another user's password is not allowed" msgstr "" -#: src/Loader/LoginComponentLoader.php:58 -msgid "Your social account has not been validated yet. Please check your inbox for instructions" +#: ./vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:78 +#: ./vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:123 +#: ./vendor/cakedc/users/src/Controller/Traits/ProfileTrait.php:51 +msgid "User was not found" msgstr "" -#: src/Mailer/UsersMailer.php:36 -msgid "Your account validation link" +#: ./vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:106 +#: ./vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:119 +#: ./vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:127 +msgid "Password could not be changed" msgstr "" -#: src/Mailer/UsersMailer.php:63 -msgid "{0}Your reset password link" +#: ./vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:115 +msgid "Password has been changed successfully" msgstr "" -#: src/Mailer/UsersMailer.php:95 -msgid "{0}Your social account validation link" +#: ./vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:169 +#: ./vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:178 +msgid "If the account is valid, the system will send an instructional email to the address on record." msgstr "" -#: src/Middleware/SocialAuthMiddleware.php:47 -#: templates/Users/social_email.php:16 -msgid "Please enter your email" +#: ./vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:172 +#: ./vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:181 +msgid "There was an error please contact Administrator" msgstr "" -#: src/Middleware/SocialAuthMiddleware.php:57 -msgid "Could not identify your account, please try again" +#: ./vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:206 +msgid "Google Authenticator token was successfully reset" msgstr "" -#: src/Middleware/UnauthorizedHandler/DefaultRedirectHandler.php:112 -msgid "You are not authorized to access that location." +#: ./vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:209 +msgid "Could not reset Google Authenticator" msgstr "" -#: src/Model/Behavior/AuthFinderBehavior.php:49 -msgid "Missing 'username' in options data" +#: ./vendor/cakedc/users/src/Controller/Traits/ProfileTrait.php:55 +msgid "Not authorized, please login first" msgstr "" -#: src/Model/Behavior/LinkSocialBehavior.php:52 -msgid "Social account already associated to another user" +#: ./vendor/cakedc/users/src/Controller/Traits/RegisterTrait.php:47 +msgid "You must log out to register a new user account" msgstr "" -#: src/Model/Behavior/PasswordBehavior.php:45 -msgid "Reference cannot be null" +#: ./vendor/cakedc/users/src/Controller/Traits/RegisterTrait.php:86 +#: ./vendor/cakedc/users/src/Controller/Traits/RegisterTrait.php:117 +msgid "The user could not be saved" msgstr "" -#: src/Model/Behavior/PasswordBehavior.php:50 -msgid "Token expiration cannot be empty" +#: ./vendor/cakedc/users/src/Controller/Traits/RegisterTrait.php:103 +#: ./vendor/cakedc/users/src/Loader/LoginComponentLoader.php:33 +msgid "Invalid reCaptcha" msgstr "" -#: src/Model/Behavior/PasswordBehavior.php:56 -#: src/Model/Behavior/PasswordBehavior.php:136 -msgid "User not found" +#: ./vendor/cakedc/users/src/Controller/Traits/RegisterTrait.php:151 +msgid "You have registered successfully, please log in" msgstr "" -#: src/Model/Behavior/PasswordBehavior.php:60 -#: src/Model/Behavior/RegisterBehavior.php:129 -msgid "User account already validated" +#: ./vendor/cakedc/users/src/Controller/Traits/RegisterTrait.php:153 +msgid "Please validate your account before log in" msgstr "" -#: src/Model/Behavior/PasswordBehavior.php:66 -msgid "User not active" +#: ./vendor/cakedc/users/src/Controller/Traits/SimpleCrudTrait.php:75 +#: ./vendor/cakedc/users/src/Controller/Traits/SimpleCrudTrait.php:105 +msgid "The {0} has been saved" msgstr "" -#: src/Model/Behavior/PasswordBehavior.php:141 -msgid "The current password does not match" +#: ./vendor/cakedc/users/src/Controller/Traits/SimpleCrudTrait.php:79 +#: ./vendor/cakedc/users/src/Controller/Traits/SimpleCrudTrait.php:109 +msgid "The {0} could not be saved" msgstr "" -#: src/Model/Behavior/PasswordBehavior.php:144 -msgid "You cannot use the current password as the new one" +#: ./vendor/cakedc/users/src/Controller/Traits/SimpleCrudTrait.php:129 +msgid "The {0} has been deleted" msgstr "" -#: src/Model/Behavior/RegisterBehavior.php:107 -msgid "User not found for the given token and email." +#: ./vendor/cakedc/users/src/Controller/Traits/SimpleCrudTrait.php:131 +msgid "The {0} could not be deleted" msgstr "" -#: src/Model/Behavior/RegisterBehavior.php:110 -msgid "Token has already expired user with no token" +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:51 +msgid "User account validated successfully" msgstr "" -#: src/Model/Behavior/RegisterBehavior.php:167 -msgid "This field is required" +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:53 +msgid "User account could not be validated" msgstr "" -#: src/Model/Behavior/SocialAccountBehavior.php:100 -#: src/Model/Behavior/SocialAccountBehavior.php:130 -msgid "Account already validated" +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:56 +msgid "User already active" msgstr "" -#: src/Model/Behavior/SocialAccountBehavior.php:104 -#: src/Model/Behavior/SocialAccountBehavior.php:135 -msgid "Account not found for the given token and email." +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:62 +msgid "Reset password token was validated successfully" msgstr "" -#: src/Model/Behavior/SocialBehavior.php:85 -msgid "Unable to login user with reference {0}" +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:70 +msgid "Reset password token could not be validated" msgstr "" -#: src/Model/Behavior/SocialBehavior.php:136 -msgid "Email not present" +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:74 +msgid "Invalid validation type" msgstr "" -#: src/Model/Table/UsersTable.php:107 -msgid "Your password does not match your confirm password. Please try again" +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:77 +msgid "Invalid token or user account already validated" msgstr "" -#: src/Model/Table/UsersTable.php:201 -msgid "Username already exists" +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:84 +msgid "Token already expired" msgstr "" -#: src/Model/Table/UsersTable.php:207 -msgid "Email already exists" +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:117 +msgid "Token has been reset successfully. Please check your email." msgstr "" -#: src/Shell/UsersShell.php:46 -msgid "Utilities for CakeDC Users Plugin" +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:122 +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:131 +msgid "Token could not be reset" msgstr "" -#: src/Shell/UsersShell.php:48 -msgid "Activate an specific user" +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:127 +msgid "User {0} was not found" msgstr "" -#: src/Shell/UsersShell.php:51 -msgid "Add a new superadmin user for testing purposes" +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:129 +msgid "User {0} is already active" msgstr "" -#: src/Shell/UsersShell.php:54 -msgid "Add a new user" +#: ./vendor/cakedc/users/src/Controller/Traits/Webauthn2faTrait.php:55 +#: ./vendor/cakedc/users/src/Controller/Traits/Webauthn2faTrait.php:76 +msgid "User already has configured webauthn2fa" msgstr "" -#: src/Shell/UsersShell.php:57 -msgid "Change the role for an specific user" +#: ./vendor/cakedc/users/src/Controller/Traits/Webauthn2faTrait.php:80 +#: ./vendor/cakedc/users/src/Controller/Traits/Webauthn2faTrait.php:127 +msgid "Register error with webauthn for user id: {0}" msgstr "" -#: src/Shell/UsersShell.php:60 -msgid "Change the api token for an specific user" +#: ./vendor/cakedc/users/src/Identifier/PasswordLockout/LockoutHandler.php:155 +msgid "Config \"timeWindowInSeconds\" must be integer greater than 60" msgstr "" -#: src/Shell/UsersShell.php:63 -msgid "Deactivate an specific user" +#: ./vendor/cakedc/users/src/Identifier/PasswordLockout/LockoutHandler.php:167 +msgid "Config \"numberOfAttemptsFail\" must be integer greater or equal 0" msgstr "" -#: src/Shell/UsersShell.php:66 -msgid "Delete an specific user" +#: ./vendor/cakedc/users/src/Identifier/PasswordLockout/LockoutHandler.php:180 +msgid "Config \"lockoutTimeInSeconds\" must be integer greater than 60" msgstr "" -#: src/Shell/UsersShell.php:69 -msgid "Reset the password via email" +#: ./vendor/cakedc/users/src/Identifier/PasswordLockoutIdentifier.php:73 +msgid "Lockout handler has not been set." msgstr "" -#: src/Shell/UsersShell.php:72 -msgid "Reset the password for all users" +#: ./vendor/cakedc/users/src/Identifier/PasswordLockoutIdentifier.php:88 +msgid "Option `className` for lockout handler is not present." msgstr "" -#: src/Shell/UsersShell.php:75 -msgid "Reset the password for an specific user" +#: ./vendor/cakedc/users/src/Loader/AuthenticationServiceLoader.php:109 +msgid "Property {0}.className should be defined" msgstr "" -#: src/Shell/UsersShell.php:135 -#: src/Shell/UsersShell.php:161 -msgid "Please enter a password." +#: ./vendor/cakedc/users/src/Loader/LoginComponentLoader.php:31 +msgid "Username or password is incorrect" msgstr "" -#: src/Shell/UsersShell.php:139 -msgid "Password changed for all users" +#: ./vendor/cakedc/users/src/Loader/LoginComponentLoader.php:52 +msgid "Could not proceed with social account. Please try again" msgstr "" -#: src/Shell/UsersShell.php:140 -#: src/Shell/UsersShell.php:168 -msgid "New password: {0}" +#: ./vendor/cakedc/users/src/Loader/LoginComponentLoader.php:54 +msgid "Your user has not been validated yet. Please check your inbox for instructions" msgstr "" -#: src/Shell/UsersShell.php:158 -#: src/Shell/UsersShell.php:186 -#: src/Shell/UsersShell.php:214 -#: src/Shell/UsersShell.php:304 -#: src/Shell/UsersShell.php:403 -msgid "Please enter a username." +#: ./vendor/cakedc/users/src/Loader/LoginComponentLoader.php:58 +msgid "Your social account has not been validated yet. Please check your inbox for instructions" msgstr "" -#: src/Shell/UsersShell.php:167 -msgid "Password changed for user: {0}" +#: ./vendor/cakedc/users/src/Mailer/UsersMailer.php:36 +msgid "Your account validation link" msgstr "" -#: src/Shell/UsersShell.php:189 -msgid "Please enter a role." +#: ./vendor/cakedc/users/src/Mailer/UsersMailer.php:71 +msgid "{0}Your reset password link" msgstr "" -#: src/Shell/UsersShell.php:195 -msgid "Role changed for user: {0}" +#: ./vendor/cakedc/users/src/Mailer/UsersMailer.php:110 +msgid "{0}Your social account validation link" msgstr "" -#: src/Shell/UsersShell.php:196 -msgid "New role: {0}" +#: ./vendor/cakedc/users/src/Middleware/SocialAuthMiddleware.php:47 +#: ./vendor/cakedc/users/templates/Users/social_email.php:16 +msgid "Please enter your email" msgstr "" -#: src/Shell/UsersShell.php:217 -msgid "Please enter a token." +#: ./vendor/cakedc/users/src/Middleware/SocialAuthMiddleware.php:57 +msgid "Could not identify your account, please try again" msgstr "" -#: src/Shell/UsersShell.php:224 -msgid "User was not saved, check validation errors" +#: ./vendor/cakedc/users/src/Middleware/UnauthorizedHandler/DefaultRedirectHandler.php:125 +msgid "Location = {0}" msgstr "" -#: src/Shell/UsersShell.php:229 -msgid "Api token changed for user: {0}" +#: ./vendor/cakedc/users/src/Middleware/UnauthorizedHandler/DefaultRedirectHandler.php:129 +msgid "You are not authorized to access that location." msgstr "" -#: src/Shell/UsersShell.php:230 -msgid "New token: {0}" +#: ./vendor/cakedc/users/src/Model/Behavior/AuthFinderBehavior.php:50 +msgid "Missing 'username' in options data" msgstr "" -#: src/Shell/UsersShell.php:245 -msgid "User was activated: {0}" +#: ./vendor/cakedc/users/src/Model/Behavior/LinkSocialBehavior.php:50 +msgid "Social account already associated to another user" msgstr "" -#: src/Shell/UsersShell.php:260 -msgid "User was de-activated: {0}" +#: ./vendor/cakedc/users/src/Model/Behavior/PasswordBehavior.php:45 +msgid "Reference cannot be null" msgstr "" -#: src/Shell/UsersShell.php:272 -msgid "Please enter a username or email." +#: ./vendor/cakedc/users/src/Model/Behavior/PasswordBehavior.php:50 +msgid "Token expiration cannot be empty" msgstr "" -#: src/Shell/UsersShell.php:280 -msgid "Please ask the user to check the email to continue with password reset process" +#: ./vendor/cakedc/users/src/Model/Behavior/PasswordBehavior.php:56 +#: ./vendor/cakedc/users/src/Model/Behavior/PasswordBehavior.php:140 +msgid "User not found" msgstr "" -#: src/Shell/UsersShell.php:350 -msgid "Superuser added:" +#: ./vendor/cakedc/users/src/Model/Behavior/PasswordBehavior.php:60 +#: ./vendor/cakedc/users/src/Model/Behavior/RegisterBehavior.php:129 +msgid "User account already validated" msgstr "" -#: src/Shell/UsersShell.php:352 -msgid "User added:" +#: ./vendor/cakedc/users/src/Model/Behavior/PasswordBehavior.php:66 +msgid "User not active" msgstr "" -#: src/Shell/UsersShell.php:354 -msgid "Id: {0}" +#: ./vendor/cakedc/users/src/Model/Behavior/PasswordBehavior.php:145 +msgid "The current password does not match" msgstr "" -#: src/Shell/UsersShell.php:355 -msgid "Username: {0}" +#: ./vendor/cakedc/users/src/Model/Behavior/PasswordBehavior.php:148 +msgid "You cannot use the current password as the new one" msgstr "" -#: src/Shell/UsersShell.php:356 -msgid "Email: {0}" +#: ./vendor/cakedc/users/src/Model/Behavior/RegisterBehavior.php:107 +msgid "User not found for the given token and email." msgstr "" -#: src/Shell/UsersShell.php:357 -msgid "Role: {0}" +#: ./vendor/cakedc/users/src/Model/Behavior/RegisterBehavior.php:110 +msgid "Token has already expired user with no token" msgstr "" -#: src/Shell/UsersShell.php:358 -msgid "Password: {0}" +#: ./vendor/cakedc/users/src/Model/Behavior/RegisterBehavior.php:167 +msgid "This field is required" msgstr "" -#: src/Shell/UsersShell.php:360 -msgid "User could not be added:" +#: ./vendor/cakedc/users/src/Model/Behavior/SocialAccountBehavior.php:100 +#: ./vendor/cakedc/users/src/Model/Behavior/SocialAccountBehavior.php:130 +msgid "Account already validated" msgstr "" -#: src/Shell/UsersShell.php:363 -msgid "Field: {0} Error: {1}" +#: ./vendor/cakedc/users/src/Model/Behavior/SocialAccountBehavior.php:104 +#: ./vendor/cakedc/users/src/Model/Behavior/SocialAccountBehavior.php:135 +msgid "Account not found for the given token and email." msgstr "" -#: src/Shell/UsersShell.php:379 -msgid "The user was not found." +#: ./vendor/cakedc/users/src/Model/Behavior/SocialBehavior.php:93 +msgid "Unable to login user with reference {0}" msgstr "" -#: src/Shell/UsersShell.php:414 -msgid "The user {0} was not deleted. Please try again" +#: ./vendor/cakedc/users/src/Model/Behavior/SocialBehavior.php:144 +msgid "Email not present" msgstr "" -#: src/Shell/UsersShell.php:416 -msgid "The user {0} was deleted successfully" +#: ./vendor/cakedc/users/src/Model/Table/UsersTable.php:108 +msgid "Your password does not match your confirm password. Please try again" msgstr "" -#: src/View/Helper/UserHelper.php:50 +#: ./vendor/cakedc/users/src/Model/Table/UsersTable.php:202 +msgid "Username already exists" +msgstr "" + +#: ./vendor/cakedc/users/src/Model/Table/UsersTable.php:208 +msgid "Email already exists" +msgstr "" + +#: ./vendor/cakedc/users/src/View/Helper/UserHelper.php:49 msgid "Sign in with" msgstr "" -#: src/View/Helper/UserHelper.php:113 +#: ./vendor/cakedc/users/src/View/Helper/UserHelper.php:112 msgid "Logout" msgstr "" -#: src/View/Helper/UserHelper.php:134 -msgid "Welcome, {0}" +#: ./vendor/cakedc/users/src/View/Helper/UserHelper.php:195 +msgid "reCaptcha is not configured! Please configure Users.reCaptcha.key" msgstr "" -#: src/View/Helper/UserHelper.php:165 -msgid "reCaptcha is not configured! Please configure Users.reCaptcha.key" +#: ./vendor/cakedc/users/src/View/Helper/UserHelper.php:213 +msgid "reCaptcha version is wrong. Please configure Users.reCaptcha.version as 2 or 3" msgstr "" -#: src/View/Helper/UserHelper.php:218 +#: ./vendor/cakedc/users/src/View/Helper/UserHelper.php:299 msgid "Connected with {0}" msgstr "" -#: src/View/Helper/UserHelper.php:223 +#: ./vendor/cakedc/users/src/View/Helper/UserHelper.php:304 msgid "Connect with {0}" msgstr "" -#: templates/Users/add.php:13 -#: templates/Users/edit.php:17 -#: templates/Users/index.php:13 -#: templates/Users/index.php:26 -#: templates/Users/view.php:15 +#: ./vendor/cakedc/users/src/Webauthn/AuthenticateAdapter.php:78 +msgid "Could not validate credential response for authentication" +msgstr "" + +#: ./vendor/cakedc/users/src/Webauthn/RegisterAdapter.php:84 +msgid "Could not credential response for registration" +msgstr "" + +#: ./vendor/cakedc/users/config/bootstrap.php:39 +msgid "Users plugin configuration key \"{0}\" was removed, please check migration guide https://github.com/CakeDC/users/blob/master/Docs/Documentation/Migration/8.x-9.0.md" +msgstr "" + +#: ./vendor/cakedc/users/config/users.php:88 +msgid "Empty password" +msgstr "" + +#: ./vendor/cakedc/users/config/users.php:89 +msgid "Too simple" +msgstr "" + +#: ./vendor/cakedc/users/config/users.php:90 +msgid "Simple" +msgstr "" + +#: ./vendor/cakedc/users/config/users.php:91 +msgid "That's OK" +msgstr "" + +#: ./vendor/cakedc/users/config/users.php:92 +msgid "Great password!" +msgstr "" + +#: ./vendor/cakedc/users/templates/Users/add.php:13 +#: ./vendor/cakedc/users/templates/Users/edit.php:17 +#: ./vendor/cakedc/users/templates/Users/index.php:13 +#: ./vendor/cakedc/users/templates/Users/index.php:26 +#: ./vendor/cakedc/users/templates/Users/view.php:15 msgid "Actions" msgstr "" -#: templates/Users/add.php:15 -#: templates/Users/edit.php:28 -#: templates/Users/view.php:23 +#: ./vendor/cakedc/users/templates/Users/add.php:15 +#: ./vendor/cakedc/users/templates/Users/edit.php:28 +#: ./vendor/cakedc/users/templates/Users/view.php:23 msgid "List Users" msgstr "" -#: templates/Users/add.php:21 -#: templates/Users/register.php:18 +#: ./vendor/cakedc/users/templates/Users/add.php:21 +#: ./vendor/cakedc/users/templates/Users/register.php:18 msgid "Add User" msgstr "" -#: templates/Users/add.php:23 -#: templates/Users/edit.php:36 -#: templates/Users/index.php:22 -#: templates/Users/login.php:20 -#: templates/Users/profile.php:30 -#: templates/Users/register.php:20 -#: templates/Users/view.php:33 +#: ./vendor/cakedc/users/templates/Users/add.php:23 +#: ./vendor/cakedc/users/templates/Users/edit.php:36 +#: ./vendor/cakedc/users/templates/Users/index.php:22 +#: ./vendor/cakedc/users/templates/Users/login.php:20 +#: ./vendor/cakedc/users/templates/Users/profile.php:31 +#: ./vendor/cakedc/users/templates/Users/register.php:20 +#: ./vendor/cakedc/users/templates/Users/view.php:33 msgid "Username" msgstr "" -#: templates/Users/add.php:24 -#: templates/Users/edit.php:37 -#: templates/Users/index.php:23 -#: templates/Users/profile.php:32 -#: templates/Users/register.php:21 -#: templates/Users/view.php:35 +#: ./vendor/cakedc/users/templates/Users/add.php:24 +#: ./vendor/cakedc/users/templates/Users/edit.php:37 +#: ./vendor/cakedc/users/templates/Users/index.php:23 +#: ./vendor/cakedc/users/templates/Users/profile.php:33 +#: ./vendor/cakedc/users/templates/Users/register.php:21 +#: ./vendor/cakedc/users/templates/Users/view.php:35 msgid "Email" msgstr "" -#: templates/Users/add.php:25 -#: templates/Users/login.php:21 -#: templates/Users/register.php:22 +#: ./vendor/cakedc/users/templates/Users/add.php:25 +#: ./vendor/cakedc/users/templates/Users/login.php:21 +#: ./vendor/cakedc/users/templates/Users/register.php:22 msgid "Password" msgstr "" -#: templates/Users/add.php:26 -#: templates/Users/edit.php:38 -#: templates/Users/index.php:24 -#: templates/Users/register.php:28 +#: ./vendor/cakedc/users/templates/Users/add.php:26 +#: ./vendor/cakedc/users/templates/Users/edit.php:38 +#: ./vendor/cakedc/users/templates/Users/index.php:24 +#: ./vendor/cakedc/users/templates/Users/register.php:31 msgid "First name" msgstr "" -#: templates/Users/add.php:27 -#: templates/Users/edit.php:39 -#: templates/Users/index.php:25 -#: templates/Users/register.php:29 +#: ./vendor/cakedc/users/templates/Users/add.php:27 +#: ./vendor/cakedc/users/templates/Users/edit.php:39 +#: ./vendor/cakedc/users/templates/Users/index.php:25 +#: ./vendor/cakedc/users/templates/Users/register.php:32 msgid "Last name" msgstr "" -#: templates/Users/add.php:30 -#: templates/Users/edit.php:54 -#: templates/Users/view.php:49 -#: templates/Users/view.php:74 +#: ./vendor/cakedc/users/templates/Users/add.php:30 +#: ./vendor/cakedc/users/templates/Users/edit.php:54 +#: ./vendor/cakedc/users/templates/Users/view.php:49 +#: ./vendor/cakedc/users/templates/Users/view.php:74 msgid "Active" msgstr "" -#: templates/Users/add.php:34 -#: templates/Users/change_password.php:25 -#: templates/Users/edit.php:58 -#: templates/Users/register.php:38 -#: templates/Users/request_reset_password.php:23 -#: templates/Users/resend_token_validation.php:20 -#: templates/Users/social_email.php:19 +#: ./vendor/cakedc/users/templates/Users/add.php:34 +#: ./vendor/cakedc/users/templates/Users/change_password.php:29 +#: ./vendor/cakedc/users/templates/Users/edit.php:58 +#: ./vendor/cakedc/users/templates/Users/register.php:41 +#: ./vendor/cakedc/users/templates/Users/request_reset_password.php:23 +#: ./vendor/cakedc/users/templates/Users/resend_token_validation.php:20 +#: ./vendor/cakedc/users/templates/Users/social_email.php:19 msgid "Submit" msgstr "" -#: templates/Users/change_password.php:5 +#: ./vendor/cakedc/users/templates/Users/change_password.php:5 msgid "Please enter the new password" msgstr "" -#: templates/Users/change_password.php:10 +#: ./vendor/cakedc/users/templates/Users/change_password.php:10 msgid "Current password" msgstr "" -#: templates/Users/change_password.php:16 +#: ./vendor/cakedc/users/templates/Users/change_password.php:17 msgid "New password" msgstr "" -#: templates/Users/change_password.php:21 -#: templates/Users/register.php:26 +#: ./vendor/cakedc/users/templates/Users/change_password.php:25 +#: ./vendor/cakedc/users/templates/Users/register.php:29 msgid "Confirm password" msgstr "" -#: templates/Users/edit.php:22 -#: templates/Users/index.php:40 +#: ./vendor/cakedc/users/templates/Users/edit.php:22 +#: ./vendor/cakedc/users/templates/Users/index.php:40 msgid "Delete" msgstr "" -#: templates/Users/edit.php:24 -#: templates/Users/index.php:40 -#: templates/Users/view.php:21 +#: ./vendor/cakedc/users/templates/Users/edit.php:24 +#: ./vendor/cakedc/users/templates/Users/index.php:40 +#: ./vendor/cakedc/users/templates/Users/view.php:21 msgid "Are you sure you want to delete # {0}?" msgstr "" -#: templates/Users/edit.php:34 -#: templates/Users/view.php:17 +#: ./vendor/cakedc/users/templates/Users/edit.php:34 +#: ./vendor/cakedc/users/templates/Users/view.php:17 msgid "Edit User" msgstr "" -#: templates/Users/edit.php:40 -#: templates/Users/view.php:43 +#: ./vendor/cakedc/users/templates/Users/edit.php:40 +#: ./vendor/cakedc/users/templates/Users/view.php:43 msgid "Token" msgstr "" -#: templates/Users/edit.php:42 +#: ./vendor/cakedc/users/templates/Users/edit.php:42 msgid "Token expires" msgstr "" -#: templates/Users/edit.php:45 +#: ./vendor/cakedc/users/templates/Users/edit.php:45 msgid "API token" msgstr "" -#: templates/Users/edit.php:48 +#: ./vendor/cakedc/users/templates/Users/edit.php:48 msgid "Activation date" msgstr "" -#: templates/Users/edit.php:51 +#: ./vendor/cakedc/users/templates/Users/edit.php:51 msgid "TOS date" msgstr "" -#: templates/Users/edit.php:64 +#: ./vendor/cakedc/users/templates/Users/edit.php:64 msgid "Reset Google Authenticator Token" msgstr "" -#: templates/Users/edit.php:70 +#: ./vendor/cakedc/users/templates/Users/edit.php:70 msgid "Are you sure you want to reset token for user \"{0}\"?" msgstr "" -#: templates/Users/index.php:15 +#: ./vendor/cakedc/users/templates/Users/index.php:15 msgid "New {0}" msgstr "" -#: templates/Users/index.php:37 +#: ./vendor/cakedc/users/templates/Users/index.php:37 msgid "View" msgstr "" -#: templates/Users/index.php:38 +#: ./vendor/cakedc/users/templates/Users/index.php:38 msgid "Change password" msgstr "" -#: templates/Users/index.php:39 +#: ./vendor/cakedc/users/templates/Users/index.php:39 msgid "Edit" msgstr "" -#: templates/Users/index.php:49 +#: ./vendor/cakedc/users/templates/Users/index.php:49 msgid "previous" msgstr "" -#: templates/Users/index.php:51 +#: ./vendor/cakedc/users/templates/Users/index.php:51 msgid "next" msgstr "" -#: templates/Users/login.php:19 +#: ./vendor/cakedc/users/templates/Users/login.php:19 msgid "Please enter your username and password" msgstr "" -#: templates/Users/login.php:29 +#: ./vendor/cakedc/users/templates/Users/login.php:29 msgid "Remember me" msgstr "" -#: templates/Users/login.php:37 +#: ./vendor/cakedc/users/templates/Users/login.php:37 msgid "Register" msgstr "" -#: templates/Users/login.php:43 +#: ./vendor/cakedc/users/templates/Users/login.php:43 msgid "Reset Password" msgstr "" -#: templates/Users/login.php:48 +#: ./vendor/cakedc/users/templates/Users/login.php:48 msgid "Login" msgstr "" -#: templates/Users/profile.php:21 +#: ./vendor/cakedc/users/templates/Users/profile.php:21 msgid "{0} {1}" msgstr "" -#: templates/Users/profile.php:27 +#: ./vendor/cakedc/users/templates/Users/profile.php:27 msgid "Change Password" msgstr "" -#: templates/Users/profile.php:38 -#: templates/Users/view.php:68 +#: ./vendor/cakedc/users/templates/Users/profile.php:39 +#: ./vendor/cakedc/users/templates/Users/view.php:68 msgid "Social Accounts" msgstr "" -#: templates/Users/profile.php:42 -#: templates/Users/view.php:73 +#: ./vendor/cakedc/users/templates/Users/profile.php:43 +#: ./vendor/cakedc/users/templates/Users/view.php:73 msgid "Avatar" msgstr "" -#: templates/Users/profile.php:43 -#: templates/Users/view.php:72 +#: ./vendor/cakedc/users/templates/Users/profile.php:44 +#: ./vendor/cakedc/users/templates/Users/view.php:72 msgid "Provider" msgstr "" -#: templates/Users/profile.php:44 +#: ./vendor/cakedc/users/templates/Users/profile.php:45 msgid "Link" msgstr "" -#: templates/Users/profile.php:51 +#: ./vendor/cakedc/users/templates/Users/profile.php:52 msgid "Link to {0}" msgstr "" -#: templates/Users/register.php:31 +#: ./vendor/cakedc/users/templates/Users/register.php:34 msgid "Accept TOS conditions?" msgstr "" -#: templates/Users/request_reset_password.php:20 +#: ./vendor/cakedc/users/templates/Users/request_reset_password.php:20 msgid "Please enter your email or username to reset your password" msgstr "" -#: templates/Users/resend_token_validation.php:15 +#: ./vendor/cakedc/users/templates/Users/resend_token_validation.php:15 msgid "Resend Validation email" msgstr "" -#: templates/Users/resend_token_validation.php:17 +#: ./vendor/cakedc/users/templates/Users/resend_token_validation.php:17 msgid "Email or username" msgstr "" -#: templates/Users/u2f_authenticate.php:22 -#: templates/Users/webauthn2fa.php:25 -msgid "Verify your registered yubico key" -msgstr "" - -#: templates/Users/u2f_authenticate.php:23 -#: templates/Users/u2f_register.php:23 -#: templates/Users/webauthn2fa.php:20 -#: templates/Users/webauthn2fa.php:26 -msgid "Please insert and tap your yubico key" -msgstr "" - -#: templates/Users/u2f_authenticate.php:24 -#: templates/Users/webauthn2fa.php:27 -msgid "You can now finish the authentication process using the registered device." -msgstr "" - -#: templates/Users/u2f_authenticate.php:25 -#: templates/Users/webauthn2fa.php:22 -#: templates/Users/webauthn2fa.php:28 -msgid "When the YubiKey starts blinking, press the golden disc to activate it. Depending on the web browser you might need to confirm the use of extended information from the YubiKey." -msgstr "" - -#: templates/Users/u2f_authenticate.php:27 -#: templates/Users/u2f_register.php:27 -#: templates/Users/webauthn2fa.php:31 -msgid "Reload" -msgstr "" - -#: templates/Users/u2f_authenticate.php:51 -#: templates/Users/u2f_register.php:56 -msgid "Yubico key check has failed, please try again" -msgstr "" - -#: templates/Users/u2f_register.php:22 -#: templates/Users/webauthn2fa.php:19 -msgid "Registering your yubico key" -msgstr "" - -#: templates/Users/verify.php:13 +#: ./vendor/cakedc/users/templates/Users/verify.php:13 msgid "Verification Code" msgstr "" -#: templates/Users/verify.php:15 +#: ./vendor/cakedc/users/templates/Users/verify.php:15 msgid " Verify" msgstr "" -#: templates/Users/view.php:19 +#: ./vendor/cakedc/users/templates/Users/view.php:19 msgid "Delete User" msgstr "" -#: templates/Users/view.php:24 +#: ./vendor/cakedc/users/templates/Users/view.php:24 msgid "New User" msgstr "" -#: templates/Users/view.php:31 +#: ./vendor/cakedc/users/templates/Users/view.php:31 msgid "Id" msgstr "" -#: templates/Users/view.php:37 +#: ./vendor/cakedc/users/templates/Users/view.php:37 msgid "First Name" msgstr "" -#: templates/Users/view.php:39 +#: ./vendor/cakedc/users/templates/Users/view.php:39 msgid "Last Name" msgstr "" -#: templates/Users/view.php:41 +#: ./vendor/cakedc/users/templates/Users/view.php:41 msgid "Role" msgstr "" -#: templates/Users/view.php:45 +#: ./vendor/cakedc/users/templates/Users/view.php:45 msgid "Api Token" msgstr "" -#: templates/Users/view.php:53 +#: ./vendor/cakedc/users/templates/Users/view.php:53 msgid "Token Expires" msgstr "" -#: templates/Users/view.php:55 +#: ./vendor/cakedc/users/templates/Users/view.php:55 msgid "Activation Date" msgstr "" -#: templates/Users/view.php:57 +#: ./vendor/cakedc/users/templates/Users/view.php:57 msgid "Tos Date" msgstr "" -#: templates/Users/view.php:59 -#: templates/Users/view.php:75 +#: ./vendor/cakedc/users/templates/Users/view.php:59 +#: ./vendor/cakedc/users/templates/Users/view.php:75 msgid "Created" msgstr "" -#: templates/Users/view.php:61 -#: templates/Users/view.php:76 +#: ./vendor/cakedc/users/templates/Users/view.php:61 +#: ./vendor/cakedc/users/templates/Users/view.php:76 msgid "Modified" msgstr "" -#: templates/Users/webauthn2fa.php:8 +#: ./vendor/cakedc/users/templates/Users/webauthn2fa.php:8 msgid "Two-factor authentication" msgstr "" -#: templates/Users/webauthn2fa.php:21 +#: ./vendor/cakedc/users/templates/Users/webauthn2fa.php:19 +msgid "Registering your yubico key" +msgstr "" + +#: ./vendor/cakedc/users/templates/Users/webauthn2fa.php:20 +#: ./vendor/cakedc/users/templates/Users/webauthn2fa.php:26 +msgid "Please insert and tap your yubico key" +msgstr "" + +#: ./vendor/cakedc/users/templates/Users/webauthn2fa.php:21 msgid "In order to enable your YubiKey the first step is to perform a registration." msgstr "" -#: templates/email/html/reset_password.php:14 -#: templates/email/html/social_account_validation.php:14 -#: templates/email/html/validation.php:13 -#: templates/email/text/reset_password.php:12 -#: templates/email/text/social_account_validation.php:12 -#: templates/email/text/validation.php:12 +#: ./vendor/cakedc/users/templates/Users/webauthn2fa.php:22 +#: ./vendor/cakedc/users/templates/Users/webauthn2fa.php:28 +msgid "When the YubiKey starts blinking, press the golden disc to activate it. Depending on the web browser you might need to confirm the use of extended information from the YubiKey." +msgstr "" + +#: ./vendor/cakedc/users/templates/Users/webauthn2fa.php:25 +msgid "Verify your registered yubico key" +msgstr "" + +#: ./vendor/cakedc/users/templates/Users/webauthn2fa.php:27 +msgid "You can now finish the authentication process using the registered device." +msgstr "" + +#: ./vendor/cakedc/users/templates/Users/webauthn2fa.php:31 +msgid "Reload" +msgstr "" + +#: ./vendor/cakedc/users/templates/email/html/reset_password.php:14 +#: ./vendor/cakedc/users/templates/email/html/social_account_validation.php:14 +#: ./vendor/cakedc/users/templates/email/html/validation.php:13 +#: ./vendor/cakedc/users/templates/email/text/reset_password.php:12 +#: ./vendor/cakedc/users/templates/email/text/social_account_validation.php:12 +#: ./vendor/cakedc/users/templates/email/text/validation.php:12 msgid "Hi {0}" msgstr "" -#: templates/email/html/reset_password.php:17 +#: ./vendor/cakedc/users/templates/email/html/reset_password.php:17 msgid "Reset your password here" msgstr "" -#: templates/email/html/reset_password.php:20 -#: templates/email/html/social_account_validation.php:23 -#: templates/email/html/validation.php:19 +#: ./vendor/cakedc/users/templates/email/html/reset_password.php:20 +#: ./vendor/cakedc/users/templates/email/html/social_account_validation.php:23 +#: ./vendor/cakedc/users/templates/email/html/validation.php:19 msgid "If the link is not correctly displayed, please copy the following address in your web browser {0}" msgstr "" -#: templates/email/html/reset_password.php:27 -#: templates/email/html/social_account_validation.php:30 -#: templates/email/html/validation.php:26 -#: templates/email/text/reset_password.php:20 -#: templates/email/text/social_account_validation.php:20 -#: templates/email/text/validation.php:20 +#: ./vendor/cakedc/users/templates/email/html/reset_password.php:27 +#: ./vendor/cakedc/users/templates/email/html/social_account_validation.php:30 +#: ./vendor/cakedc/users/templates/email/html/validation.php:26 +#: ./vendor/cakedc/users/templates/email/text/reset_password.php:20 +#: ./vendor/cakedc/users/templates/email/text/social_account_validation.php:20 +#: ./vendor/cakedc/users/templates/email/text/validation.php:20 msgid "Thank you" msgstr "" -#: templates/email/html/social_account_validation.php:18 +#: ./vendor/cakedc/users/templates/email/html/social_account_validation.php:18 msgid "Activate your social login here" msgstr "" -#: templates/email/html/validation.php:16 +#: ./vendor/cakedc/users/templates/email/html/validation.php:16 msgid "Activate your account here" msgstr "" -#: templates/email/text/reset_password.php:14 -#: templates/email/text/validation.php:14 +#: ./vendor/cakedc/users/templates/email/text/reset_password.php:14 +#: ./vendor/cakedc/users/templates/email/text/validation.php:14 msgid "Please copy the following address in your web browser {0}" msgstr "" -#: templates/email/text/social_account_validation.php:14 +#: ./vendor/cakedc/users/templates/email/text/social_account_validation.php:14 msgid "Please copy the following address in your web browser to activate your social login {0}" msgstr "" diff --git a/src/Controller/Traits/PasswordManagementTrait.php b/src/Controller/Traits/PasswordManagementTrait.php index edf071777..9625429de 100644 --- a/src/Controller/Traits/PasswordManagementTrait.php +++ b/src/Controller/Traits/PasswordManagementTrait.php @@ -166,7 +166,10 @@ public function requestResetPassword() 'type' => 'password', ]); if ($resetUser) { - $msg = __d('cake_d_c/users', 'If the account is valid, the system will send an instructional email to the address on record.'); + $msg = __d( + 'cake_d_c/users', + 'If the account is valid, the system will send an instructional email to the address on record.' + ); $this->Flash->success($msg); } else { $msg = __d('cake_d_c/users', 'There was an error please contact Administrator'); @@ -175,7 +178,10 @@ public function requestResetPassword() return $this->redirect(['action' => 'login']); } catch (UserNotFoundException | UserNotActiveException $exception) { - $msg = __d('cake_d_c/users', 'If the account is valid, the system will send an instructional email to the address on record.'); + $msg = __d( + 'cake_d_c/users', + 'If the account is valid, the system will send an instructional email to the address on record.' + ); $this->Flash->success($msg); } catch (Exception $exception) { $msg = __d('cake_d_c/users', 'There was an error please contact Administrator'); diff --git a/src/Controller/Traits/RegisterTrait.php b/src/Controller/Traits/RegisterTrait.php index 2c7068473..6a8b257c8 100644 --- a/src/Controller/Traits/RegisterTrait.php +++ b/src/Controller/Traits/RegisterTrait.php @@ -77,7 +77,7 @@ public function register() } elseif (Configure::read('Users.Registration.showVerboseError') && count($errors) > 0) { $this->set(compact('user')); foreach ($errors as $error) { - $this->Flash->error(__($error)); + $this->Flash->error($error); } return; @@ -109,7 +109,7 @@ public function register() $errors = \collection($user->getErrors())->unfold()->toArray(); if (!$userSaved && Configure::read('Users.Registration.showVerboseError') && count($errors) > 0) { foreach ($errors as $error) { - $this->Flash->error(__($error)); + $this->Flash->error($error); } return; diff --git a/src/Controller/Traits/UserValidationTrait.php b/src/Controller/Traits/UserValidationTrait.php index bbe594ca4..1c565dc04 100644 --- a/src/Controller/Traits/UserValidationTrait.php +++ b/src/Controller/Traits/UserValidationTrait.php @@ -43,7 +43,10 @@ public function validate($type = null, $token = null) try { $result = $this->getUsersTable()->validate($token, 'activateUser'); if ($result) { - $event = $this->dispatchEvent(Plugin::EVENT_AFTER_EMAIL_TOKEN_VALIDATION, ['user' => $result]); + $event = $this->dispatchEvent( + Plugin::EVENT_AFTER_EMAIL_TOKEN_VALIDATION, + ['user' => $result] + ); $eventResult = $event->getResult(); if (!empty($eventResult) && is_array($eventResult)) { return $this->redirect($eventResult); diff --git a/src/Identifier/PasswordLockout/LockoutHandler.php b/src/Identifier/PasswordLockout/LockoutHandler.php index f91ead084..596f58d4f 100644 --- a/src/Identifier/PasswordLockout/LockoutHandler.php +++ b/src/Identifier/PasswordLockout/LockoutHandler.php @@ -152,7 +152,12 @@ protected function getTimeWindow(): DateTime return (new DateTime())->subSeconds($timeWindow); } - throw new \UnexpectedValueException(__d('cake_d_c/users', 'Config "timeWindowInSeconds" must be integer greater than 60')); + throw new \UnexpectedValueException( + __d( + 'cake_d_c/users', + 'Config "timeWindowInSeconds" must be integer greater than 60' + ) + ); } /** @@ -164,7 +169,12 @@ protected function getNumberOfAttemptsFail(): int if (is_int($number) && $number >= 1) { return $number; } - throw new \UnexpectedValueException(__d('cake_d_c/users', 'Config "numberOfAttemptsFail" must be integer greater or equal 0')); + throw new \UnexpectedValueException( + __d( + 'cake_d_c/users', + 'Config "numberOfAttemptsFail" must be integer greater or equal 0' + ) + ); } /** @@ -177,7 +187,12 @@ protected function getLockoutTime(): int return $lockTime; } - throw new \UnexpectedValueException(__d('cake_d_c/users', 'Config "lockoutTimeInSeconds" must be integer greater than 60')); + throw new \UnexpectedValueException( + __d( + 'cake_d_c/users', + 'Config "lockoutTimeInSeconds" must be integer greater than 60' + ) + ); } /** diff --git a/src/Identifier/PasswordLockoutIdentifier.php b/src/Identifier/PasswordLockoutIdentifier.php index 2157dc812..c1fbc3360 100644 --- a/src/Identifier/PasswordLockoutIdentifier.php +++ b/src/Identifier/PasswordLockoutIdentifier.php @@ -85,7 +85,12 @@ protected function buildLockoutHandler(array|string $config): LockoutHandlerInte ]; } if (!isset($config['className'])) { - throw new \InvalidArgumentException(__d('cake_d_c/users', 'Option `className` for lockout handler is not present.')); + throw new \InvalidArgumentException( + __d( + 'cake_d_c/users', + 'Option `className` for lockout handler is not present.' + ) + ); } $className = $config['className']; diff --git a/src/Model/Behavior/SocialAccountBehavior.php b/src/Model/Behavior/SocialAccountBehavior.php index 10408a060..a0a84650d 100644 --- a/src/Model/Behavior/SocialAccountBehavior.php +++ b/src/Model/Behavior/SocialAccountBehavior.php @@ -38,7 +38,11 @@ class SocialAccountBehavior extends Behavior public function initialize(array $config): void { parent::initialize($config); - $this->_table->belongsTo('Users')->setForeignKey('user_id')->setJoinType('INNER')->setClassName(Configure::read('Users.table')); + $this->_table + ->belongsTo('Users') + ->setForeignKey('user_id') + ->setJoinType('INNER') + ->setClassName(Configure::read('Users.table')); } /** diff --git a/src/Model/Behavior/SocialBehavior.php b/src/Model/Behavior/SocialBehavior.php index 79dabbf49..0eea327d9 100644 --- a/src/Model/Behavior/SocialBehavior.php +++ b/src/Model/Behavior/SocialBehavior.php @@ -230,7 +230,10 @@ protected function _populateUser($data, $existingUser, $useEmail, $validateEmail if ( $useEmail && empty($dataValidated) || - ($this->validateSocialAccount && !Configure::read('OAuth.providers.' . $data['provider'] . '.skipSocialAccountValidation')) + ( + $this->validateSocialAccount && + !Configure::read('OAuth.providers.' . $data['provider'] . '.skipSocialAccountValidation') + ) ) { $accountData['active'] = 0; } diff --git a/src/Plugin.php b/src/Plugin.php index 833a029cc..9c2ae5949 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -48,7 +48,8 @@ class Plugin extends BasePlugin public const EVENT_AFTER_RESEND_TOKEN_VALIDATION = 'Users.Global.afterResendTokenValidation'; public const EVENT_AFTER_EMAIL_TOKEN_VALIDATION = 'Users.Global.afterEmailTokenValidation'; - public const DEPRECATED_MESSAGE_U2F = 'U2F is no longer supported by chrome, we suggest using Webauthn as a replacement'; + public const DEPRECATED_MESSAGE_U2F = + 'U2F is no longer supported by chrome, we suggest using Webauthn as a replacement'; /** * @inheritDoc diff --git a/src/View/Helper/UserHelper.php b/src/View/Helper/UserHelper.php index e34578d95..faf32bae4 100644 --- a/src/View/Helper/UserHelper.php +++ b/src/View/Helper/UserHelper.php @@ -168,9 +168,14 @@ public function addPasswordMeter(): string { $this->addPasswordMeterScript(); $requiredScore = Configure::read('Users.passwordMeter.requiredScore', 3); - $messagesList = json_encode(Configure::read('Users.passwordMeter.messagesList', ['Empty password', 'Too simple', 'Simple', 'That\'s OK', 'Great password!'])); - $pswMinLength = Configure::read('Users.passwordMeter.pswMinLength', 8); - $showMessage = (string)Configure::read('Users.passwordMeter.showMessage', true); + $messagesList = json_encode( + Configure::read( + 'Users.passwordMeter.messagesList', + ['Empty password', 'Too simple', 'Simple', 'That\'s OK', 'Great password!'] + ) + ); + $pswMinLength = Configure::read('Users.passwordMinLength', 8); + $showMessage = Configure::read('Users.passwordMeter.showMessage', true) ? 'true' : 'false'; $script = $this->Html->scriptBlock(" const requiredScore = $requiredScore; const messagesList = $messagesList; diff --git a/src/Webauthn/AuthenticateAdapter.php b/src/Webauthn/AuthenticateAdapter.php index 2adebbd61..082f45758 100644 --- a/src/Webauthn/AuthenticateAdapter.php +++ b/src/Webauthn/AuthenticateAdapter.php @@ -75,7 +75,12 @@ public function verifyResponse(): \Webauthn\PublicKeyCredentialSource ); } - throw new BadRequestException(__('Could not validate credential response for authentication')); + throw new BadRequestException( + __d( + 'cake_d_c/users', + 'Could not validate credential response for authentication' + ) + ); } /** diff --git a/src/Webauthn/BaseAdapter.php b/src/Webauthn/BaseAdapter.php index 1bf5a331e..ed6d815d6 100644 --- a/src/Webauthn/BaseAdapter.php +++ b/src/Webauthn/BaseAdapter.php @@ -115,8 +115,9 @@ public function hasCredential(): bool /** * @param \Webauthn\AttestationStatement\AttestationStatementSupportManager $attestationStatementSupportManager */ - public function setAttestationStatementSupportManager(AttestationStatementSupportManager $attestationStatementSupportManager): void - { + public function setAttestationStatementSupportManager( + AttestationStatementSupportManager $attestationStatementSupportManager + ): void { $this->attestationStatementSupportManager = $attestationStatementSupportManager; } diff --git a/src/Webauthn/PublicKeyCredentialLoader.php b/src/Webauthn/PublicKeyCredentialLoader.php index a0cf8113d..f23c3c4a7 100644 --- a/src/Webauthn/PublicKeyCredentialLoader.php +++ b/src/Webauthn/PublicKeyCredentialLoader.php @@ -26,14 +26,16 @@ public function loadArray(array $json): PublicKeyCredential isset($json['response']['clientDataJSON']) && is_string($json['response']['clientDataJSON']) ) { - $json['response']['clientDataJSON'] = Base64Utility::complyEncodedNoPadding($json['response']['clientDataJSON']); + $json['response']['clientDataJSON'] = + Base64Utility::complyEncodedNoPadding($json['response']['clientDataJSON']); } if ( isset($json['response']['authenticatorData']) && is_string($json['response']['authenticatorData']) ) { - $json['response']['authenticatorData'] = Base64Utility::complyEncodedNoPadding($json['response']['authenticatorData']); + $json['response']['authenticatorData'] = + Base64Utility::complyEncodedNoPadding($json['response']['authenticatorData']); } return parent::loadArray($json); diff --git a/src/Webauthn/RegisterAdapter.php b/src/Webauthn/RegisterAdapter.php index b6a00b546..ca883d8f4 100644 --- a/src/Webauthn/RegisterAdapter.php +++ b/src/Webauthn/RegisterAdapter.php @@ -81,7 +81,7 @@ public function verifyResponse(): \Webauthn\PublicKeyCredentialSource return $credential; } - throw new BadRequestException(__('Could not credential response for registration')); + throw new BadRequestException(__d('cake_d_c/users', 'Could not credential response for registration')); } /** diff --git a/templates/Users/change_password.php b/templates/Users/change_password.php index c266c3aa3..233343c27 100644 --- a/templates/Users/change_password.php +++ b/templates/Users/change_password.php @@ -16,7 +16,7 @@ 'id' => 'new-password', 'label' => __d('cake_d_c/users', 'New password')]); ?> - + User->addPasswordMeter() ?> Form->control('password_confirm', [ From 465d199f9bca10f8db18d0605a4aa96572d199ac Mon Sep 17 00:00:00 2001 From: Alejandro Ibarra Date: Fri, 24 May 2024 06:53:33 +0200 Subject: [PATCH 11/29] Update CHANGELOG.md for 14.2.1 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9373b9c7e..4d1dc91e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ Changelog ========= Releases for CakePHP 5 ------------- +* 14.2.1 + * Improve documentation about password meter. + * Fix minor bugs * 14.2.0 * Add password meter to display password quality * Add integration with google reCaptcha v3, keep default using v2 From 590c8df933391c8ff513b51bb513788661cb0228 Mon Sep 17 00:00:00 2001 From: Alejandro Ibarra Date: Fri, 24 May 2024 06:53:55 +0200 Subject: [PATCH 12/29] Update .semver for 14.2.1 --- .semver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.semver b/.semver index a44d34328..36811af68 100644 --- a/.semver +++ b/.semver @@ -1,5 +1,5 @@ --- :major: 14 :minor: 2 -:patch: 0 +:patch: 1 :special: '' From bb6328319e0e7389989dd2c6ed096b8f67d8fc20 Mon Sep 17 00:00:00 2001 From: MarwanSalim <45453458+MarwanSalim@users.noreply.github.com> Date: Thu, 20 Jun 2024 15:31:26 +0800 Subject: [PATCH 13/29] Update Translations.md Update documentation --- Docs/Documentation/Translations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/Documentation/Translations.md b/Docs/Documentation/Translations.md index 566911ea7..38e4d9f52 100644 --- a/Docs/Documentation/Translations.md +++ b/Docs/Documentation/Translations.md @@ -16,6 +16,6 @@ The Plugin is translated into several languages: * Czech (cs_CZ) by @Mapiiik * Dutch (nl_NL) by @StefanvanR -**Note:** To overwrite the plugin translations, create a file inside your project 'resources/locales//{$lang}/' folder, with the name 'Users.po' and add the strings with the new translations. +**Note:** To overwrite the plugin translations, create a file inside your project 'resources/locales//{$lang}/' folder, with the name 'cake_d_c_users.po' and add the strings with the new translations. Remember to clean the translations cache! From 0383dcc645ee7ea272280e8f2f841c007767a1d4 Mon Sep 17 00:00:00 2001 From: Robitmoh Date: Mon, 22 Jul 2024 08:55:58 +0200 Subject: [PATCH 14/29] Fix the named parameter in Model/Behavior/SocialBehavior.php --- src/Model/Behavior/SocialBehavior.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Behavior/SocialBehavior.php b/src/Model/Behavior/SocialBehavior.php index 0eea327d9..f9a306cec 100644 --- a/src/Model/Behavior/SocialBehavior.php +++ b/src/Model/Behavior/SocialBehavior.php @@ -143,7 +143,7 @@ protected function _createSocialUser($data, $options = []) if ($useEmail && empty($email)) { throw new MissingEmailException(__d('cake_d_c/users', 'Email not present')); } else { - $existingUser = $this->_table->find('existingForSocialLogin', options: ['email' => $email])->first(); + $existingUser = $this->_table->find('existingForSocialLogin', email: $email )->first(); } $user = $this->_populateUser($data, $existingUser, $useEmail, $validateEmail, $tokenExpiration); From 366e99dd940a6f7ed3da2e3fd7e76b59f63c1f4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florencio=20Hern=C3=A1ndez?= Date: Thu, 1 Aug 2024 12:08:29 +0100 Subject: [PATCH 15/29] Bug #1084 Fix issue with avatar images long URL --- ...ChangeAvatarColumnTypeInSocialAccounts.php | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 config/Migrations/20240801112143_ChangeAvatarColumnTypeInSocialAccounts.php diff --git a/config/Migrations/20240801112143_ChangeAvatarColumnTypeInSocialAccounts.php b/config/Migrations/20240801112143_ChangeAvatarColumnTypeInSocialAccounts.php new file mode 100644 index 000000000..0fb638b81 --- /dev/null +++ b/config/Migrations/20240801112143_ChangeAvatarColumnTypeInSocialAccounts.php @@ -0,0 +1,24 @@ +table('social_accounts'); + $table->changeColumn('avatar', 'text', [ + 'default' => null, + 'null' => true, + ]); + $table->update(); + } +} From a80f33d9995bbe49d22af426a6868c8680dfcc61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florencio=20Hern=C3=A1ndez?= Date: Thu, 1 Aug 2024 12:56:51 +0100 Subject: [PATCH 16/29] Feature Security Policy Doc: add security policy doc and update README file --- .github/SECURITY.md | 35 +++++++++++++++++++++++++++++++++++ README.md | 5 +++++ 2 files changed, 40 insertions(+) create mode 100644 .github/SECURITY.md diff --git a/.github/SECURITY.md b/.github/SECURITY.md new file mode 100644 index 000000000..c92d7ed03 --- /dev/null +++ b/.github/SECURITY.md @@ -0,0 +1,35 @@ +# Security Policy + +## Supported Versions + +We support fixing security issues on the following releases: + +| Version | Supported | Security fixes until +|---------|--------------------| -------------------- +| 14.2.1 | :white_check_mark: | 12 Months after the release (24 May 2025) +| 14.1.1 | :white_check_mark: | 12 Months after the release (08 May 2025) +| 14.0.1 | :white_check_mark: | 12 Months after the release (11 Mar 2025) +| 13.0.1 | :white_check_mark: | 12 Months after the release (11 Mar 2025) +| 12.0.0 | :white_check_mark: | 12 Months after the release (06 Nov 2024) +| 11.3.5 | :white_check_mark: | 12 Months after the release (11 Mar 2025) +| 11.2.6 | :white_check_mark: | 12 Months after the release (23 Nov 2024) +| 11.1.1 | :x: | No longer supported +| 9.3.1 | :x: | No longer supported +| 9.2.1 | :x: | No longer supported +| 8.5.2 | :x: | No longer supported + +## Reporting a Vulnerability + +If you’ve found a security issue in CakeDC Users plugin, please use the following procedure +instead of the normal bug reporting system. Instead of using the bug tracker please send an +email to security [at] cakedc.com. + +For each report, we try to first confirm the vulnerability. Once confirmed, +the CakeDC team will take the following actions: + +* Acknowledge to the reporter that we’ve received the issue, and are + working on a fix. We ask that the reporter keep the issue confidential until we announce it. +* Get a fix/patch prepared. +* Prepare a post describing the vulnerability, and the possible exploits. +* Release new versions of all affected versions. +* Prominently feature the problem in the release announcement \ No newline at end of file diff --git a/README.md b/README.md index 72b69e4e2..ff37e7597 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,11 @@ Contributing This repository follows the [CakeDC Plugin Standard](https://www.cakedc.com/plugin-standard). If you'd like to contribute new features, enhancements or bug fixes to the plugin, please read our [Contribution Guidelines](https://www.cakedc.com/contribution-guidelines) for detailed instructions. +Security +------------ + +If you've found a security issue in CakeDC Users plugin, please use the procedure described in [SECURITY.md](.github/SECURITY.md) + License ------- From a7370ef0fe72d471338976139240de72bb6b19ee Mon Sep 17 00:00:00 2001 From: Alejandro Ibarra Date: Fri, 2 Aug 2024 09:25:41 +0200 Subject: [PATCH 17/29] 1092 - Fix CS issue --- src/Model/Behavior/SocialBehavior.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Behavior/SocialBehavior.php b/src/Model/Behavior/SocialBehavior.php index f9a306cec..78fe8d836 100644 --- a/src/Model/Behavior/SocialBehavior.php +++ b/src/Model/Behavior/SocialBehavior.php @@ -143,7 +143,7 @@ protected function _createSocialUser($data, $options = []) if ($useEmail && empty($email)) { throw new MissingEmailException(__d('cake_d_c/users', 'Email not present')); } else { - $existingUser = $this->_table->find('existingForSocialLogin', email: $email )->first(); + $existingUser = $this->_table->find('existingForSocialLogin', email: $email)->first(); } $user = $this->_populateUser($data, $existingUser, $useEmail, $validateEmail, $tokenExpiration); From 8bf6adbd0b23af8cd53b6e4f2f0f2a828b76cee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florencio=20Hern=C3=A1ndez?= Date: Fri, 2 Aug 2024 10:23:50 +0100 Subject: [PATCH 18/29] Fix pipeline issue with findExistingForSocialLogin from SocialBehavior --- src/Model/Behavior/SocialBehavior.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Model/Behavior/SocialBehavior.php b/src/Model/Behavior/SocialBehavior.php index 763be8c91..e1b345624 100644 --- a/src/Model/Behavior/SocialBehavior.php +++ b/src/Model/Behavior/SocialBehavior.php @@ -278,8 +278,13 @@ public function generateUniqueUsername($username) */ public function findExistingForSocialLogin(\Cake\ORM\Query $query, array $options) { + $email = $options['email'] ?? null; + if (!$email) { + return $query->where('1 != 1'); + } + return $query->where([ - $this->_table->aliasField('email') => $options['email'], + $this->_table->aliasField('email') => $email, ]); } From fb202393bd0f64067433f0181e314111e3cfcbff Mon Sep 17 00:00:00 2001 From: Adam Rusinowski Date: Wed, 4 Sep 2024 10:57:30 +0200 Subject: [PATCH 19/29] #1096: fixed `findExistingForSocialLogin` finder --- src/Model/Behavior/SocialBehavior.php | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/Model/Behavior/SocialBehavior.php b/src/Model/Behavior/SocialBehavior.php index 36c0fb4c6..03a01e927 100644 --- a/src/Model/Behavior/SocialBehavior.php +++ b/src/Model/Behavior/SocialBehavior.php @@ -14,8 +14,10 @@ namespace CakeDC\Users\Model\Behavior; use Cake\Core\Configure; +use Cake\Database\Expression\QueryExpression; use Cake\Datasource\EntityInterface; use Cake\Event\EventDispatcherTrait; +use Cake\ORM\Query\SelectQuery; use Cake\Utility\Hash; use CakeDC\Users\Exception\AccountNotActiveException; use CakeDC\Users\Exception\MissingEmailException; @@ -138,7 +140,6 @@ protected function _createSocialUser($data, $options = []) $useEmail = $options['use_email'] ?? null; $validateEmail = (bool)($options['validate_email'] ?? null); $tokenExpiration = $options['token_expiration'] ?? null; - $existingUser = null; $email = $data['email'] ?? null; if ($useEmail && empty($email)) { throw new MissingEmailException(__d('cake_d_c/users', 'Email not present')); @@ -276,19 +277,17 @@ public function generateUniqueUsername($username) * Prepare a query to retrieve existing entity for social login * * @param \Cake\ORM\Query\SelectQuery $query The base query. - * @param array $options Find options with email key. + * @param mixed $email Find options with email key. * @return \Cake\ORM\Query\SelectQuery */ - public function findExistingForSocialLogin(\Cake\ORM\Query\SelectQuery $query, array $options) + public function findExistingForSocialLogin(SelectQuery $query, mixed $email): SelectQuery { - $email = $options['email'] ?? null; - if (!$email) { - return $query->where('1 != 1'); - } - - return $query->where([ - $this->_table->aliasField('email') => $email, - ]); + return $query->where( + fn(QueryExpression $expression) => $expression->eq( + $this->_table->aliasField('email'), + $email + ) + ); } /** From 313ef12e78d4b3bad13ef80fa1ac609b8fd04c3f Mon Sep 17 00:00:00 2001 From: Adam Rusinowski Date: Wed, 4 Sep 2024 14:46:49 +0200 Subject: [PATCH 20/29] #1096: simplified `findExistingForSocialLogin` finder --- src/Model/Behavior/SocialBehavior.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Model/Behavior/SocialBehavior.php b/src/Model/Behavior/SocialBehavior.php index 03a01e927..2c0e982c8 100644 --- a/src/Model/Behavior/SocialBehavior.php +++ b/src/Model/Behavior/SocialBehavior.php @@ -14,7 +14,6 @@ namespace CakeDC\Users\Model\Behavior; use Cake\Core\Configure; -use Cake\Database\Expression\QueryExpression; use Cake\Datasource\EntityInterface; use Cake\Event\EventDispatcherTrait; use Cake\ORM\Query\SelectQuery; @@ -277,17 +276,18 @@ public function generateUniqueUsername($username) * Prepare a query to retrieve existing entity for social login * * @param \Cake\ORM\Query\SelectQuery $query The base query. - * @param mixed $email Find options with email key. + * @param string|null $email Find options with email key. * @return \Cake\ORM\Query\SelectQuery */ - public function findExistingForSocialLogin(SelectQuery $query, mixed $email): SelectQuery + public function findExistingForSocialLogin(SelectQuery $query, ?string $email = null): SelectQuery { - return $query->where( - fn(QueryExpression $expression) => $expression->eq( - $this->_table->aliasField('email'), - $email - ) - ); + if (!$email) { + return $query->where('1 != 1'); + } + + return $query->where([ + $this->_table->aliasField('email') => $email, + ]); } /** From 325c48cda803182c74cfbfa35ad65c24900f62c2 Mon Sep 17 00:00:00 2001 From: Adam Rusinowski Date: Wed, 4 Sep 2024 20:18:34 +0200 Subject: [PATCH 21/29] #1096: fixed cs --- .../Controller/Traits/Webauthn2FaTraitTest.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/tests/TestCase/Controller/Traits/Webauthn2FaTraitTest.php b/tests/TestCase/Controller/Traits/Webauthn2FaTraitTest.php index 6dfa19bfd..2550c1194 100644 --- a/tests/TestCase/Controller/Traits/Webauthn2FaTraitTest.php +++ b/tests/TestCase/Controller/Traits/Webauthn2FaTraitTest.php @@ -108,11 +108,10 @@ public function testWebauthn2faIsRegister() $this->Trait ->expects($this->exactly(2)) ->method('set') - ->willReturnCallback(fn ($name, $value) => - match ([$name, $value]) { - ['isRegister', true] => null, - ['username', 'user-2'] => null - }); + ->willReturnCallback(fn ($name, $value) => match ([$name, $value]) { + ['isRegister', true] => null, + ['username', 'user-2'] => null + }); $this->Trait->webauthn2fa(); $this->assertSame( $user, @@ -146,11 +145,10 @@ public function testWebauthn2faDontRequireRegister() $this->Trait ->expects($this->exactly(2)) ->method('set') - ->willReturnCallback(fn ($name, $value) => - match ([$name, $value]) { - ['isRegister', false] => null, - ['username', 'user-1'] => null - }); + ->willReturnCallback(fn ($name, $value) => match ([$name, $value]) { + ['isRegister', false] => null, + ['username', 'user-1'] => null + }); $this->Trait->webauthn2fa(); $this->assertSame( $user, From b1c6370bb2806a67988e4ce27265974907fe27f4 Mon Sep 17 00:00:00 2001 From: Umer Salman Date: Mon, 28 Oct 2024 11:28:05 -0500 Subject: [PATCH 22/29] Split rule name for the Rule Checker When registering a new user after registering a first, we get an error for "A rule with the same name already exists in /web/geoviz2/vendor/cakephp/cakephp/src/Datasource/RulesChecker.php on line 428". This fixes. --- src/Model/Table/UsersTable.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Model/Table/UsersTable.php b/src/Model/Table/UsersTable.php index 353b43cfd..5f176492e 100644 --- a/src/Model/Table/UsersTable.php +++ b/src/Model/Table/UsersTable.php @@ -197,13 +197,13 @@ public function validationRegister(Validator $validator) */ public function buildRules(RulesChecker $rules): RulesChecker { - $rules->add($rules->isUnique(['username']), '_isUnique', [ + $rules->add($rules->isUnique(['username']), '_isUniqueUsername', [ 'errorField' => 'username', 'message' => __d('cake_d_c/users', 'Username already exists'), ]); if ($this->isValidateEmail) { - $rules->add($rules->isUnique(['email']), '_isUnique', [ + $rules->add($rules->isUnique(['email']), '_isUniqueEmail', [ 'errorField' => 'email', 'message' => __d('cake_d_c/users', 'Email already exists'), ]); From 9f9f49bb8a0f0302ddfab46195367b1f73d698da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Gonz=C3=A1lez?= Date: Mon, 25 Nov 2024 18:04:16 +0000 Subject: [PATCH 23/29] fix docs --- .semver | 2 +- CHANGELOG.md | 7 +++++++ README.md | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.semver b/.semver index 36811af68..683f3209a 100644 --- a/.semver +++ b/.semver @@ -1,5 +1,5 @@ --- :major: 14 -:minor: 2 +:minor: 3 :patch: 1 :special: '' diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d1dc91e7..9d32cbe57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ Changelog ========= Releases for CakePHP 5 ------------- +* 14.3.1 + * Fix duplicated rule name in rules checker +* 14.3.0 + * Update Translations.md by @MarwanSalim in #1089 + * Fix named parameter issue in _createSocialUser method for findExistingForSocialLogin #1091 by @robitmoh in #1092 + * Bug #1084 Fix issue with avatar images long URL by @flohdez in #1094 + * #1096: fixed findExistingForSocialLogin finder by @arusinowski in #1097 * 14.2.1 * Improve documentation about password meter. * Fix minor bugs diff --git a/README.md b/README.md index ff37e7597..58980549e 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Versions and branches | CakePHP | CakeDC Users Plugin | Tag | Notes | |:--------------:|:----------------------------------------------------------:|:------:|:---------| -| ^5.0 | [14.2](https://github.com/cakedc/users/tree/14.next-cake5) | 14.2.1 | stable | +| ^5.0 | [14.2](https://github.com/cakedc/users/tree/14.next-cake5) | 14.3.1 | stable | | ^4.5 | [13.0](https://github.com/cakedc/users/tree/13.next-cake4) | 13.0.1 | stable | | ^5.0 | [12.0](https://github.com/cakedc/users/tree/12.next-cake5) | 12.0 | beta | | ^4.3 | [11.0](https://github.com/cakedc/users/tree/11.next-cake4) | 11.1.0 | stable | From 73ad42e7240be71e2fa4d0ef7c80d50d8fee9dc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20P=C3=A9rez?= Date: Thu, 9 Jan 2025 13:19:51 +0000 Subject: [PATCH 24/29] update missing spanish translations --- resources/locales/cake_d_c_users.pot | 90 +- resources/locales/es/cake_d_c_users.mo | Bin 13478 -> 18314 bytes resources/locales/es/cake_d_c_users.po | 1100 ++++++++++++++---------- 3 files changed, 677 insertions(+), 513 deletions(-) diff --git a/resources/locales/cake_d_c_users.pot b/resources/locales/cake_d_c_users.pot index 267142b12..327a229da 100644 --- a/resources/locales/cake_d_c_users.pot +++ b/resources/locales/cake_d_c_users.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" -"POT-Creation-Date: 2024-05-10 08:44+0000\n" +"POT-Creation-Date: 2025-01-09 06:42-0600\n" "PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n" "Last-Translator: NAME \n" "Language-Team: LANGUAGE \n" @@ -255,20 +255,20 @@ msgid "Password has been changed successfully" msgstr "" #: ./vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:169 -#: ./vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:178 +#: ./vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:181 msgid "If the account is valid, the system will send an instructional email to the address on record." msgstr "" -#: ./vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:172 -#: ./vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:181 +#: ./vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:175 +#: ./vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:187 msgid "There was an error please contact Administrator" msgstr "" -#: ./vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:206 +#: ./vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:212 msgid "Google Authenticator token was successfully reset" msgstr "" -#: ./vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:209 +#: ./vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:215 msgid "Could not reset Google Authenticator" msgstr "" @@ -316,52 +316,52 @@ msgstr "" msgid "The {0} could not be deleted" msgstr "" -#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:51 +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:54 msgid "User account validated successfully" msgstr "" -#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:53 +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:56 msgid "User account could not be validated" msgstr "" -#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:56 +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:59 msgid "User already active" msgstr "" -#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:62 +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:65 msgid "Reset password token was validated successfully" msgstr "" -#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:70 +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:73 msgid "Reset password token could not be validated" msgstr "" -#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:74 +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:77 msgid "Invalid validation type" msgstr "" -#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:77 +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:80 msgid "Invalid token or user account already validated" msgstr "" -#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:84 +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:87 msgid "Token already expired" msgstr "" -#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:117 +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:120 msgid "Token has been reset successfully. Please check your email." msgstr "" -#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:122 -#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:131 +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:125 +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:134 msgid "Token could not be reset" msgstr "" -#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:127 +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:130 msgid "User {0} was not found" msgstr "" -#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:129 +#: ./vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:132 msgid "User {0} is already active" msgstr "" @@ -375,15 +375,15 @@ msgstr "" msgid "Register error with webauthn for user id: {0}" msgstr "" -#: ./vendor/cakedc/users/src/Identifier/PasswordLockout/LockoutHandler.php:155 +#: ./vendor/cakedc/users/src/Identifier/PasswordLockout/LockoutHandler.php:156 msgid "Config \"timeWindowInSeconds\" must be integer greater than 60" msgstr "" -#: ./vendor/cakedc/users/src/Identifier/PasswordLockout/LockoutHandler.php:167 +#: ./vendor/cakedc/users/src/Identifier/PasswordLockout/LockoutHandler.php:173 msgid "Config \"numberOfAttemptsFail\" must be integer greater or equal 0" msgstr "" -#: ./vendor/cakedc/users/src/Identifier/PasswordLockout/LockoutHandler.php:180 +#: ./vendor/cakedc/users/src/Identifier/PasswordLockout/LockoutHandler.php:191 msgid "Config \"lockoutTimeInSeconds\" must be integer greater than 60" msgstr "" @@ -391,7 +391,7 @@ msgstr "" msgid "Lockout handler has not been set." msgstr "" -#: ./vendor/cakedc/users/src/Identifier/PasswordLockoutIdentifier.php:88 +#: ./vendor/cakedc/users/src/Identifier/PasswordLockoutIdentifier.php:89 msgid "Option `className` for lockout handler is not present." msgstr "" @@ -494,17 +494,17 @@ msgstr "" msgid "This field is required" msgstr "" -#: ./vendor/cakedc/users/src/Model/Behavior/SocialAccountBehavior.php:100 -#: ./vendor/cakedc/users/src/Model/Behavior/SocialAccountBehavior.php:130 +#: ./vendor/cakedc/users/src/Model/Behavior/SocialAccountBehavior.php:104 +#: ./vendor/cakedc/users/src/Model/Behavior/SocialAccountBehavior.php:134 msgid "Account already validated" msgstr "" -#: ./vendor/cakedc/users/src/Model/Behavior/SocialAccountBehavior.php:104 -#: ./vendor/cakedc/users/src/Model/Behavior/SocialAccountBehavior.php:135 +#: ./vendor/cakedc/users/src/Model/Behavior/SocialAccountBehavior.php:108 +#: ./vendor/cakedc/users/src/Model/Behavior/SocialAccountBehavior.php:139 msgid "Account not found for the given token and email." msgstr "" -#: ./vendor/cakedc/users/src/Model/Behavior/SocialBehavior.php:93 +#: ./vendor/cakedc/users/src/Model/Behavior/SocialBehavior.php:94 msgid "Unable to login user with reference {0}" msgstr "" @@ -532,23 +532,23 @@ msgstr "" msgid "Logout" msgstr "" -#: ./vendor/cakedc/users/src/View/Helper/UserHelper.php:195 +#: ./vendor/cakedc/users/src/View/Helper/UserHelper.php:200 msgid "reCaptcha is not configured! Please configure Users.reCaptcha.key" msgstr "" -#: ./vendor/cakedc/users/src/View/Helper/UserHelper.php:213 +#: ./vendor/cakedc/users/src/View/Helper/UserHelper.php:218 msgid "reCaptcha version is wrong. Please configure Users.reCaptcha.version as 2 or 3" msgstr "" -#: ./vendor/cakedc/users/src/View/Helper/UserHelper.php:299 +#: ./vendor/cakedc/users/src/View/Helper/UserHelper.php:304 msgid "Connected with {0}" msgstr "" -#: ./vendor/cakedc/users/src/View/Helper/UserHelper.php:304 +#: ./vendor/cakedc/users/src/View/Helper/UserHelper.php:309 msgid "Connect with {0}" msgstr "" -#: ./vendor/cakedc/users/src/Webauthn/AuthenticateAdapter.php:78 +#: ./vendor/cakedc/users/src/Webauthn/AuthenticateAdapter.php:79 msgid "Could not validate credential response for authentication" msgstr "" @@ -556,30 +556,6 @@ msgstr "" msgid "Could not credential response for registration" msgstr "" -#: ./vendor/cakedc/users/config/bootstrap.php:39 -msgid "Users plugin configuration key \"{0}\" was removed, please check migration guide https://github.com/CakeDC/users/blob/master/Docs/Documentation/Migration/8.x-9.0.md" -msgstr "" - -#: ./vendor/cakedc/users/config/users.php:88 -msgid "Empty password" -msgstr "" - -#: ./vendor/cakedc/users/config/users.php:89 -msgid "Too simple" -msgstr "" - -#: ./vendor/cakedc/users/config/users.php:90 -msgid "Simple" -msgstr "" - -#: ./vendor/cakedc/users/config/users.php:91 -msgid "That's OK" -msgstr "" - -#: ./vendor/cakedc/users/config/users.php:92 -msgid "Great password!" -msgstr "" - #: ./vendor/cakedc/users/templates/Users/add.php:13 #: ./vendor/cakedc/users/templates/Users/edit.php:17 #: ./vendor/cakedc/users/templates/Users/index.php:13 diff --git a/resources/locales/es/cake_d_c_users.mo b/resources/locales/es/cake_d_c_users.mo index 9487e26de9c423aa3fa063a14e5d6748185623cf..8a7c36c6d2efbc83869475549b5df439dac41f16 100644 GIT binary patch literal 18314 zcmb`Od6XqpeaDMc903*C1u2G2bow#FfWk0?GxW^B3^PMB)59X5RKKe3F6VXCqw2kG z8blN|xDjJqFmczopn?kqF$4^>q9`GW=fov3!GCgca&k0AjWOyU`F!tEud4esF2{Gc z{jIunm*4&E_uk=Ok2vt10lz0GCs5vUa1b1|Ul9EIP}K&(*t3IRJ9s(xbnw04(cs6x zO1D^?g*x~0vrVbtf4*?$oHQ%>D zwf{bNI{0hw9PpIq*!EX}8t3H>bMX1R-wK`regZrTd>q^W{uQyK7=a4fG30R1-0IXK+*LTP<;F*D1G>m!~X@1YQjv>aTs_Q zcoL}bMnJ7&J*fVh!54v3pvHMWD1H67!$-jrdH*+1`gOo_?RYN$ckzB6cqMo{cs}?f zcqVup#=_ErQBd-^78Jj40JWam-S@jdjsFNJ{`>%32mS&)16<3;)4*%M7l5w;HU6hT z(fe&s^E~O^e*up0z8{N#l;A8-{JInre|LkL=Vf3B&Vu60o!|?>kAafcw?M6Te~c>x z&jcYU*bZvGDNu5IH3(~h*MpMl2SM@wlOUu7Uj#+}KZ4SaUxCuEXM~o|8$i)_Ehsx^ zgIZS))Ofdm(xcnK3&2l-TGzjWTE_t}Q{z7uY=N6V(b)w>*Bzkf{RD_f1P_B+-*?^n zAt-_L>LgHlavCT(tp(L@8yJEU?)z)ORlL6q6g>}tqW6~|suvspv69<~AS?{FfTBNk z_y$mN_%w*C3GN5g{&7(A{R|YJ4#R0kE+>ML=PFR^eJQAQ6`=gk9q#>upw{;QD0;pH zs{KEMEH(HksP!EMvt$>ifSUJQP~Wcu4+L)oCBN5!p9S9rieDF@4BNp1JR5uvRQ-<~ zh76|lj)CHT4sHhD0$v6F11NiW!Sn4r^PuQ_6}Sn!9n|;7z^8%7qU4fu2r@;m9=vit z^aI?<`vVxm)4`{sv~&rc1BxH(LCt>|cplgRrH3B{4*?fI(fK$ie*LHWzCS{horVt2 z1rO$ZJ1BWv4r;y#WGTTuP;z-YI0`-ts{KJ!O0I`G48hgBp98920?JR^0d57q25Q}h zx6l>vI#Bxe5m5H@R{Ia zuKs)A3f}(*)VicR8uw_2CxX(GQ$f*@g8PF7C_U(d6W}f2B=`gHBJkq1mfkmkD|vqp z7=jOh`u-#+`c|G}<+jn`c2M(=gNK6GfTDLAd^UI^h)9Arx%&G-t^4a>2tEO7J^uwB z2L2LMzeCQo`gA-feyst;&yAq;=5p|I@EY(X;N9Rez#oFBPVj#qsvVq8Fp^xyK&`6} zYMgh2H-mS9SA(a$*!rJaL8^iWz|+8=fRe|tD8KCB91zwAmxCJrwV>?fZczOBHneRfC%MW>EaO(|!LisCn)I#n;Ed z=YYQiF8~kc&qi=NC_3K^qLRUbpw{yvkdP4^xgOsNo&%l?o(D=_UJ7cwHh2s;2a11h z1;w{7fEw?sp!oT7Q1U-+gOyhZYF#e|rEi-+jlT`t4(_Ko@O$9t;E%zL;4v7R z?C2`+L~sr~7JMftdhP+`A0Bn}D-gc)=@jrt@Jvwpb0HXlV;~|7ZUCj9cY&JkKJXIo zUqI1&`bHaXR)dfdYzNiu4WRtYXF$pMJD|pwlNBBTs{T~)dEid)c(4N=1>O!K>fn9u z{X3x6^F#N3@I|)Y3E*+mUjT}4dtLo?V95I`LGkN-p!o0w5YmIkLCNP(m?C+u0Y%rj z;Jx6*p!Dxo;2!Yw%~nrt0x|vIK5z^8A7BWc#f$hp21<`J@EY(za4&e=R?Dv(JcRdo z@M7>b@MYjPK+%6Dm6~@AC_TLv+z*_lTt?YVxu0?XMRfTe%LzW`UZxzL0p3V?oqPW) zhhG6Zl*=hBFZep;dW!rs*#G$^>PWatGzJ6#o;A()&9pucAn%FQ-U``e9zd ztM$Ndf%0YZWdDdSe?vK#BHR9R%BLv$eT_11o{$wN-Pl3-hO3LgTPU)9>CZexzsD$V zHBa`>&A>+~hfzLHk&fyITZ3;>uGR~`FHsJp3wR0Ti?#PZ<$0xhmtTJ^ur(_p@Ns-;?_cjaW?rqONav|j|itOel$|;n4 zDQ~2-DLW}IqSSxy;^i%_VjFm_dp;lBMEMZqI*M$jr0Dlf$_FS9Qm&-DkMeHH(@B@tQSU|B8lSpa5n0sanwuV>I>gH zahT=3a3UG7+;&eJb;I8g)XLlxAW5J1Y)1Gqi87cdgaF z192SgHB)udaNKf@C&Rz6Jso9JiCv}WSr^{C`j%i*k%Z90QryE_1T%Yi7$=>CMVz8m zaCy0AMN%eekAw{WG;+9-J}c=28=@i@H4}$pXv17y#Qwdz=v|zTDrzN*#SC-Hfc76;Bp!khV^HZp`R^GOQQ-=r<2d2B%^sYnNEc(J9&Fw-tUd4Gs(7WPa+K~ zSB5kF(r8VZ^^z$Dn?lEWV2>q*FIrvo&iXSGNpacard}_Z>GsO4D9rM`Sz2;K9|;cz z=rQk=X%^>mzw7M9Otm(VlO^q5IG6UOjdWcFQm<8cYk>b!G-;~U#Z_UqlSE|__KNv1 znu^k_#gM*vyGSt8o-`AocQHOIfg+ho%U%&l`)kc7S&d=7G&HJxNX;md^HRIY43(MRpcH-CIjKh)K3da_aT3A)uU3Z@*$XLAzaB!)VN&BojU3)YC;^I{F(g6j+P$F|xc=MYNyE;PZ?NiesiJLtJZt8z|zIAHI`j`@H+$17CZc`7ln) zZYP>g;z|+Pd3W9nHJQuF7-!@L#h)9kpGzjfi6Wnqvy>O!mW9kD$C8Ih7EPe9rrp*3 ziS*LMjb_-#TDl^FhTWvVOU~dX>m~@fnOVKJ>gv5nMx$7;FID#Ie2_R_4M*f8YTYwa0VgL^Mofc50Rqxmplt72lPDt$iFLaba^vs{ zyDyPvv)osGFC3~=<0f^t4ZPi&aR#{rf>Fxd2;rW8nqOmkDY&)@r&W`tUEB6joT|^T z1bn$>l@A)yU^a~!3pO09W-+^)-55onKb6zbXY|QF?MbH;yp4o{J$9S4Y0(DI zc!Ol|*JT*h9HaETyzco;WtA$UzxW%J$Zstc_Yji@ty{sK{=^LV+MYgIs}+S2o85R_ zplz(#x{VXr_DPR|aoFEplrn~Kp4fml6A`*in~HfuRA4H}5>oLb9+DVqd_zKm7iBby zu~gqgzihQnXhtu%sbxeOs{*`UKUH#08zI3QA=su;DnPxYZ{ zkK-^B!RU->cYTb>dgw{GDV|9)yL(|%Fg{J}B{kr*fQN!TTFRa$u-0h)hFfmzQdio# zDho}u&|!iIP% z3E03qaP){bFYSTC_*_0R2}iKIMf;t-HXTLnZ7yRp$WTyJeifkvdyR50vc<~XG(R^4 zzf7B|y0I2Fjr91a=X5Xk2Q%F77;B&gc9@x3`vnL}vPJ<3-m}UU!Z+*bZB5c3v z)g*8|>}r`KBQuy$K)3I6A*8C0lMyqIOxC)%>Qgm|ol}aBR(ge~Q>RZ2yEQ#brmfNR zQ1x?L!>S&ESN??I)6DH`sv#^@<}^-wXT`74JWhf}O`94~m)cE0D;)PH2)3Qu?Av_` z!8i_UG4qNvnG3E=I_-QWS!I&`E7_@=l+y2iO3smbB&OPe5q8;Xq2_FY#QD6#fr7SS zZR4B$20QJw!p%vS(5pDD-3X2A`!4JtoJpsqdn8K`gn}DYVMC>seNH#>$uPOG#|V5* zGwrqP`X`IrHge>(f~y%T!q*tRsdfRD9_6+S8TBwA%Rt*67eMgp^<Nx1f7rIF3(XR|FYCEuuWZ`G-l z9i+LRZEhR~&Sjo0Watv)ntx2QiTp-m-L<2F(hh9aD%T=uo4wNSJ6wi(1*r0Dn)l0~ z+MmmkH1@!Com`RVy;-;yj+d>fPfK}p^%inARf?yKG*{%=)L@Ov4&b}6u(P!VSR2T% z=->u4GP9w@^WDnJe_O{!F~ z@T|v&jrokNZ{by16UBve%%=L$R5CK2L^IXowtc&|u?;bCTdfC8*M&*BV&}Gu&IrD-QSB+e36FaSVEKhX$x3+ce zia*><3%;Ejit5_nkuPu3Z40`q5r?ygmn`6nd{uzL&p zb!#HkBEs2F-A)(o&4Qton-qPRW#MyCoEE6Ip`gas>N*RbJu{KAuxjy+TpMp6`SO;s zx9}ktN$R4@nD7QpPe@1!o+YeG$y=ks-_E$!oR-#`7r5jiA-ZtL&k=%WuV=Pr&!Wp3 zLslV?Bbzc|CBf)Z)K$Ymq84XHuQ8u-I9Tr?KQ{;+I0X64?W8gT8pMIT2PZt$QXs=2 z_El`KQZ!_T>0y$+$jE59Tb(#D=iNq0q&*Bf6U{62)t%0eVTNDtEIUjdl5ldayxed@ zFMF09&5SZCw@v=BNHADro7700GKmw-RDo9cnwl|2MyYGYNStTUlhJHmtRlhbE!>5L z;!5E)XLYlA%b7CD-^Fn??HN7n_7QE21q879BRB1Uy3j_K9x2p5KGa?ey+XV&nPD2+ANEzZFN z{-JVZ7jf}{ScX}+?xYAJ7ODi>vDHYEL?dj%0m!wQzRfL;5!itK_pwolwreH^Uzy z0-QIC#bDhX)+{Gd8iRU+WeTG6j7%5SHKJ%kpE!o+ zaSKMZ^Y1W8lcG8=y z#0QkRY=Uj1WdZsZwioV=(KPm~y z3wJxwRp|x)3Ia1DH8Z+8o_39Iu%9iDs{sk`Ne6-DW$kH;;dWpF`AF)z*bGa5OqAD3q~-OSG#_+uVau@3dY-y7tUvpF%q63}9C5N~ zEq#0{pQ16w)kxmVq6wL0s*7Bk=-IG4aKyuhYnWrbiREi80(J?K9P0RqO?o(k1CZHG z^l!3Gz?!#XxH!Wd916&j9D)gu5s|dzuoNvyC`k=T1Pl$P6wnNMj;PL!DD*uOT&Q=j3BVtoqvQ zRb}m90!^;Td)N-GzBzS64fdvNxiJtko|8ea*PQ@C!C>pjvMMPlEmJx?!LDZEUZ!vC z5Sq;x#B)f^Nn~2#wxyfq!Jb<4Xnfnz?MnU8jhx4j&u$TeuYO9`4`1NA`46@S^?MT0 zhvOrdX&0i6g6=$PIn^q|VB~Ah2WSyh7ofPmR~(FhGoN$-XsUW09m9S)uialQ5%nQOlti4TSV zt=doRt&dHMkHwZPMdj4sjHjb1@0!B#VW!K!MxTge{Kg@)yt*sP_q%@O=s16+ikyn` zrM`0ShkXKzZfoXx6sW}-B{So-fT_e+DUCc*`y>&WoCEgn~N-eG~HOYY}q>1r8GM`uXS|8!4DlH)RR7A zD%#eQzf|NHi}WY1q(xprOZ!`DN8PSi;oqGHX?rKr8oc|X0KbJc93LDnkg6>{^0U{q z>5x>+=Qo_!t5I+f8wLJ137o@OoK#4CNBbs?LC5{IE&sM5O~|ZG4%Cg}#GF}Si@HjX zG3eHo%||MfdL=w`KlRE+e{YGOsZuUI!4ABk&rLR?|mK$cf7Kg!-|@}M~~`z zXiohm@akl}?(BsO%X=rcCwHl>*$cTTm-v-EZb$CNS#lZU4n53}-a~0=W+an$)RKgG zo9E$g^9dJPP*cQ7bK-eccgw>Rc1hktZ{s?>x6{9qi6fIfEMZ9?31LfuGJ!(Tr71w^ZxgD&b{ZJ z^PO+G$^HX5UD3?@!>)MPp>?4mw7iewoQJyya-sd>D#sZBFT#A-d$8k-goSVntcDeE zZ7{wA_GA1k)Vw3G5T1s`@Ha3Q>eAP7GR_b>{TYvd)1ZOOaaO{K@FvJaXD{UE+{0x& zd;$)EKMwdN9LD$qC<8tV?*AK(Vw}rltuqx4f>m$?`#aarxq=%Tpia6O;snQod2k2R zNp6E9;6XSPz8LUSaQ|&6r+osih8KfzE|ax!A?yXmLK!$7=CZ$2MrQ%6gZ!M^xr~Dr zPKU>#HogEW;D4YDt>Cyayawt-^Pvn_26cc9P#bT7B`^%->3snYz|580c#IBfI?qGG z>>P)(@HEtmuS31~DOAia1}qrvIHMWQh7;j>sP}in6>vYC56{7ka3t=W3vYo1@JJs1 zmy1tv84J$^5B>?Ya2|ft$*Z7pV<{|!op1^~3}x8Qp%#2A;3vWTeq^jXGX!d#BBA6WB#rx)idf(+qj!?19?gVJHv00%h1oPzLoQGwC`dQ18`3 z#eNOM3C{Jw^Efn&?}Q4`w_q8}9HS#kK7g{cm{sM0Nl>v~1!b`x&_cQNI3%pjNvM;b zg>vl$SPnmfI>2~NMc1i=q>ZyN7;lFdoN@Nj(Z)|ez3@C#E}Vd}^n5V>7%JOyIle-W z2eH{13+rJmtb)6tLi*i+=b;XgOT6eh)1azt8N6Qge?OfS-1rd6fH}-otX4s7cmtGy zTVV)pgT3JkP*w6Bh;7a>s4939-j+j^K&`XW;7xc3ln0JN8S*Neqxyf34tqQK99tVz zL*8}fLB(_n)bk`%wLAcoWL;3MKMG~Q38-8+2Ni<9K+QAMutHS|Wk@YlZbV>4S-O*s z>i=%27Y;#L`W)26<4}gZ4mJO6sQDM5=3j)0y%I&qmkag&)lh~{f--O+lz~l9hVL4O z|MlQ*Zs^PPO{fiDgj)DDsEvOCd%<_0T>dVUAs@hN;9ns&I5Q|E12@2HVF#1}KZJAO zJ5V7RN=a$`Q4{dLlBt9nvS@n1`LGY;mC(TTPzJU`CFSi<9ykCMqQg)gco}MgpTO1d z4XA1vH?gPOro+jMw?J%h_GReE@*_|uIs8c@n0bqip>rPM#q4)g7LVuqDpo)(R0owrH$WK@ zhxPCUSONbCWk}J~9s^gvV#X;*9y$*}y?+d<%6I?xYbf$IM(9a;1#>;wBx z>xu1PXc!wf8;0POuoG(GeQ+^63T5bLa30jxN6)W;GSGtx$-PiHb1dL%u#o+oU(r$4 z{|(NCgYc)ujZo#XIT)v)POu;9%lB<4&zubI{|p+&A3=Fw5b;n*OJHxf5Xyk1PzT-u zGn?t8=qRSYg!+VD$)yp_hX(G2a#2lgxeYEiTnEl2HW5Au-O6G$HqwQPK$PJMa1k-?*=4NXSM7llftw-;S% zy@JkaNcJoLdt5#X-iK~R520a5O?gm)9!FOpwd>Gsl#9}6Ba-(ByYm%vsXa?)S1^dc zeMpHoAC)4tjNx(v8ibaiII2Nvx1gP92U>{;pR*mQDZ|xeif%;{Py>1%-HrO9yO7#q6h``R z#n9K$ooFB`MtRS0Q5%hX)P(HgLr>(y?e)Xf+Y`g`>mm{3nz+|tlIb=t;YM1cag$DZ z3DfK+Ov+29qVX2fmQJ+!NiXSyKA)~R_MgKh_i1-iZoiqF+o6euY^{M5N8{8ef=Dsk%hcIL$7z)U~%xTHRY5G5O}q zsx>Q@Ha4s?8yeTFU9xh;z*Q^Pl{a9S_A6iDro0+cRZ%&+yt1Oavf5P5sHvVgwSvaP z@-<$2H2Ht?=9X7fGSyVhsG(C)#k}Qiyd~|nc;)Lnx3$JB53N|VKD4OO)HPlgTC#jV zeQ3dgHH~Z6USo@<9PC{+t;!ymd~Kf^<0S`n_n%sxW0#f{%sBZyHxf;lblk+#Ub}x; zaX6tbK1(OlZX)X22g|1S4fRw*ak&{yHJFH}C4vd;KvA4LN>%vwnQ1llT*Y)dw6e@D ztUMcD?8n?Ml!DWc_Tnj*K((JdtcWREE&-Oi0wM(j}+n1~Fvm0k_=>B+S zC}(gP^IF>yX|Ks;wmmm%o*g;+sQuUMW%kiIdA4)TW43OQu?=(Q*si%#rl@8-FXAVh z#+Y{R8IbXOTs-`wPfojwdwe^frqVuBGsT+nJUh7dar%oopnvpq`UVn_$Ws;_9b<8S((Kb MZpoI}q(x2t1%hHvv;Y7A diff --git a/resources/locales/es/cake_d_c_users.po b/resources/locales/es/cake_d_c_users.po index 96df31fdd..642b3b4d5 100644 --- a/resources/locales/es/cake_d_c_users.po +++ b/resources/locales/es/cake_d_c_users.po @@ -4,836 +4,1024 @@ msgid "" msgstr "" "Project-Id-Version: CakeDC Users\n" -"POT-Creation-Date: 2017-10-14 23:45+0000\n" -"PO-Revision-Date: 2019-01-10 13:01-0200\n" +"POT-Creation-Date: 2025-01-09 06:42-0600\n" +"PO-Revision-Date: 2025-01-09 13:13+0000\n" +"Last-Translator: Marcelo Rocha \n" "Language-Team: CakeDC \n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 2.2\n" -"Last-Translator: Marcelo Rocha \n" -"Language: es\n" +"X-Generator: Poedit 3.5\n" + +#: vendor/cakedc/users/src/Command/Logic/ChangeUserActiveTrait.php:25 +#: vendor/cakedc/users/src/Command/UsersChangeApiTokenCommand.php:46 +#: vendor/cakedc/users/src/Command/UsersChangeRoleCommand.php:46 +#: vendor/cakedc/users/src/Command/UsersDeleteUserCommand.php:42 +#: vendor/cakedc/users/src/Command/UsersResetPasswordCommand.php:46 +msgid "Please enter a username." +msgstr "Por favor introduce el nombre de usuario." + +#: vendor/cakedc/users/src/Command/Logic/CreateUserTrait.php:89 +msgid "Superuser added:" +msgstr "Superusuario añadido:" + +#: vendor/cakedc/users/src/Command/Logic/CreateUserTrait.php:91 +msgid "User added:" +msgstr "Usuario añadido:" + +#: vendor/cakedc/users/src/Command/Logic/CreateUserTrait.php:93 +msgid "Id: {0}" +msgstr "Id: {0}" + +#: vendor/cakedc/users/src/Command/Logic/CreateUserTrait.php:94 +msgid "Username: {0}" +msgstr "Nombre de usuario: {0}" + +#: vendor/cakedc/users/src/Command/Logic/CreateUserTrait.php:95 +msgid "Email: {0}" +msgstr "Email: {0}" + +#: vendor/cakedc/users/src/Command/Logic/CreateUserTrait.php:96 +msgid "Role: {0}" +msgstr "Rol: {0}" + +#: vendor/cakedc/users/src/Command/Logic/CreateUserTrait.php:97 +msgid "Password: {0}" +msgstr "Contraseña: {0}" + +#: vendor/cakedc/users/src/Command/Logic/CreateUserTrait.php:99 +msgid "User could not be added:" +msgstr "No se pudo añadir el usuario:" + +#: vendor/cakedc/users/src/Command/Logic/CreateUserTrait.php:102 +msgid "Field: {0} Error: {1}" +msgstr "Campo: {0} Error: {1}" + +#: vendor/cakedc/users/src/Command/Logic/UpdateUserTrait.php:29 +msgid "The user was not found." +msgstr "Usuario no encontrado." + +#: vendor/cakedc/users/src/Command/UsersActivateUserCommand.php:31 +msgid "Activate a specific user" +msgstr "Activar un usuario específico" + +#: vendor/cakedc/users/src/Command/UsersActivateUserCommand.php:44 +msgid "User was activated: {0}" +msgstr "Usuario activado: {0}" + +#: vendor/cakedc/users/src/Command/UsersChangeApiTokenCommand.php:31 +msgid "Change the api token for a specific user" +msgstr "Cambiar el token de API para un usuario concreto" + +#: vendor/cakedc/users/src/Command/UsersChangeApiTokenCommand.php:49 +msgid "Please enter a token." +msgstr "Por favor introduce un token" + +#: vendor/cakedc/users/src/Command/UsersChangeApiTokenCommand.php:58 +msgid "Api token changed for user: {0}" +msgstr "API token cambiado para el usuario: {0}" + +#: vendor/cakedc/users/src/Command/UsersChangeApiTokenCommand.php:59 +msgid "New token: {0}" +msgstr "Nuevo token: {0}" + +#: vendor/cakedc/users/src/Command/UsersChangeRoleCommand.php:31 +msgid "Change the role for a specific user" +msgstr "Cambiar el rol para un usuario concreto" + +#: vendor/cakedc/users/src/Command/UsersChangeRoleCommand.php:49 +msgid "Please enter a role." +msgstr "Por favor introduce el rol." + +#: vendor/cakedc/users/src/Command/UsersChangeRoleCommand.php:55 +msgid "Role changed for user: {0}" +msgstr "Rol cambiado para el usuario: {0}" + +#: vendor/cakedc/users/src/Command/UsersChangeRoleCommand.php:56 +msgid "New role: {0}" +msgstr "Nuevo rol: {0}" + +#: vendor/cakedc/users/src/Command/UsersDeactivateUserCommand.php:31 +msgid "Deactivate a specific user" +msgstr "Desactivar un usuario concreto" + +#: vendor/cakedc/users/src/Command/UsersDeactivateUserCommand.php:44 +msgid "User was de-activated: {0}" +msgstr "Usuario desactivado: {0}" + +#: vendor/cakedc/users/src/Command/UsersDeleteUserCommand.php:28 +msgid "Delete a specific user" +msgstr "Borrar un usuario concreto" + +#: vendor/cakedc/users/src/Command/UsersDeleteUserCommand.php:57 +msgid "The user {0} was not deleted. Please try again" +msgstr "El usuario {0} no ha sido borrado. Inténtalo de nuevo por favor" + +#: vendor/cakedc/users/src/Command/UsersDeleteUserCommand.php:59 +msgid "The user {0} was deleted successfully" +msgstr "El usuario {0} se borró correctamente" + +#: vendor/cakedc/users/src/Command/UsersPasswordEmailCommand.php:29 +msgid "Reset the password via email" +msgstr "Restablecer la contraseña vía email" + +#: vendor/cakedc/users/src/Command/UsersPasswordEmailCommand.php:43 +msgid "Please enter a username or email." +msgstr "Por favor introduce el nombre de usuario o email." + +#: vendor/cakedc/users/src/Command/UsersPasswordEmailCommand.php:55 +msgid "" +"Please ask the user to check the email to continue with password reset " +"process" +msgstr "" +"Por favor, pide al usuario que mire su buzón de correo para continuar con el " +"proceso de restablecimiento de su contraseña" + +#: vendor/cakedc/users/src/Command/UsersPasswordEmailCommand.php:61 +msgid "The password token could not be generated. Please try again" +msgstr "" +"No se pudo generar el token de contraseña. Por favor, inténtalo de nuevo" + +#: vendor/cakedc/users/src/Command/UsersResetAllPasswordsCommand.php:29 +msgid "Reset the password for all users" +msgstr "Restablecer la contraseña de todos los usuarios" + +#: vendor/cakedc/users/src/Command/UsersResetAllPasswordsCommand.php:44 +#: vendor/cakedc/users/src/Command/UsersResetPasswordCommand.php:49 +msgid "Please enter a password." +msgstr "Por favor, introduce una contraseña." -#: Auth/SocialAuthenticate.php:456 -msgid "Provider cannot be empty" -msgstr "El proveedor no puede ser vacío" +#: vendor/cakedc/users/src/Command/UsersResetAllPasswordsCommand.php:48 +msgid "Password changed for all users" +msgstr "Contraseña cambiada para todos los usuarios" + +#: vendor/cakedc/users/src/Command/UsersResetAllPasswordsCommand.php:49 +#: vendor/cakedc/users/src/Command/UsersResetPasswordCommand.php:56 +msgid "New password: {0}" +msgstr "Nueva contraseña: {0}" + +#: vendor/cakedc/users/src/Command/UsersResetPasswordCommand.php:31 +msgid "Reset the password for a specific user" +msgstr "Restablecer la contraseña de un usuario concreto" + +#: vendor/cakedc/users/src/Command/UsersResetPasswordCommand.php:55 +msgid "Password changed for user: {0}" +msgstr "Contraseña cambiada para el usuario: {0}" + +#: vendor/cakedc/users/src/Controller/Component/LoginComponent.php:262 +#: vendor/cakedc/users/src/View/Helper/UserHelper.php:133 +msgid "Welcome, {0}" +msgstr "Bienvenido/a, {0}" -#: Controller/SocialAccountsController.php:52 +#: vendor/cakedc/users/src/Controller/SocialAccountsController.php:50 msgid "Account validated successfully" msgstr "Cuenta validada correctamente" -#: Controller/SocialAccountsController.php:54 +#: vendor/cakedc/users/src/Controller/SocialAccountsController.php:52 msgid "Account could not be validated" msgstr "No se pudo validar la cuenta" -#: Controller/SocialAccountsController.php:57 +#: vendor/cakedc/users/src/Controller/SocialAccountsController.php:55 msgid "Invalid token and/or social account" msgstr "Token o cuenta social incorrecta" -#: Controller/SocialAccountsController.php:59;87 +#: vendor/cakedc/users/src/Controller/SocialAccountsController.php:57 +#: vendor/cakedc/users/src/Controller/SocialAccountsController.php:85 msgid "Social Account already active" msgstr "Cuenta social ya activa" -#: Controller/SocialAccountsController.php:61 +#: vendor/cakedc/users/src/Controller/SocialAccountsController.php:59 msgid "Social Account could not be validated" msgstr "No se pudo validar la cuenta social " -#: Controller/SocialAccountsController.php:80 +#: vendor/cakedc/users/src/Controller/SocialAccountsController.php:78 msgid "Email sent successfully" msgstr "Email enviado correctamente" -#: Controller/SocialAccountsController.php:82 +#: vendor/cakedc/users/src/Controller/SocialAccountsController.php:80 msgid "Email could not be sent" msgstr "No se puede enviar el email" -#: Controller/SocialAccountsController.php:85 +#: vendor/cakedc/users/src/Controller/SocialAccountsController.php:83 msgid "Invalid account" msgstr "Cuenta inválida" -#: Controller/SocialAccountsController.php:89 +#: vendor/cakedc/users/src/Controller/SocialAccountsController.php:87 msgid "Email could not be resent" msgstr "No se puede reenviar el Email" -#: Controller/Component/RememberMeComponent.php:68 -msgid "Invalid app salt, app salt must be at least 256 bits (32 bytes) long" -msgstr "App salt inválido, debe contener al menos 256 bits (32 bytes)" - -#: Controller/Component/UsersAuthComponent.php:204 -msgid "You can't enable email validation workflow if use_email is false" -msgstr "" -"No es posible activar el flujo de trabajo para la validación de email si " -"use_mail es falso" - -#: Controller/Traits/LinkSocialTrait.php:54 -#, fuzzy +#: vendor/cakedc/users/src/Controller/Traits/LinkSocialTrait.php:56 msgid "Could not associate account, please try again." -msgstr "" -"No se pudo generar el token de contraseña. Por favor, inténtalo de nuevo" +msgstr "No se pudo asociar la cuenta, por favor, inténtalo de nuevo." -#: Controller/Traits/LinkSocialTrait.php:77 -#, fuzzy +#: vendor/cakedc/users/src/Controller/Traits/LinkSocialTrait.php:80 msgid "Social account was associated." -msgstr "Cuenta social ya activa" - -#: Controller/Traits/LoginTrait.php:104 -msgid "Issues trying to log in with your social account" -msgstr "Hubo un problema al iniciar sesión con tu cuenta social" - -#: Controller/Traits/LoginTrait.php:109 Template/Users/social_email.ctp:16 -msgid "Please enter your email" -msgstr "Por favor, introduce tu email" +msgstr "La cuenta social ha sido activada." -#: Controller/Traits/LoginTrait.php:120 -msgid "" -"Your user has not been validated yet. Please check your inbox for " -"instructions" -msgstr "" -"El usuario no se ha validado todavía. Instrucciones enviadas a tu bandeja de " -"entrada" - -#: Controller/Traits/LoginTrait.php:125 -msgid "" -"Your social account has not been validated yet. Please check your inbox for " -"instructions" -msgstr "" -"La cuenta social no se ha validado todavía. Instrucciones enviadas a tu " -"bandeja de entrada" +#: vendor/cakedc/users/src/Controller/Traits/LoginTrait.php:73 +msgid "You've successfully logged out" +msgstr "Sesión finalizada correctamente" -#: Controller/Traits/LoginTrait.php:180 Controller/Traits/RegisterTrait.php:82 -msgid "Invalid reCaptcha" -msgstr "El código reCaptcha no es válido" +#: vendor/cakedc/users/src/Controller/Traits/OneTimePasswordVerifyTrait.php:75 +msgid "Please enable Google Authenticator first." +msgstr "Por favor, habilita el autenticador de Google primero." -#: Controller/Traits/LoginTrait.php:191 -msgid "You are already logged in" -msgstr "Ya has iniciado sesión" +#: vendor/cakedc/users/src/Controller/Traits/OneTimePasswordVerifyTrait.php:90 +msgid "Could not find user data" +msgstr "No se ha encontrado datos de usuario" -#: Controller/Traits/LoginTrait.php:212 -msgid "Please enable Google Authenticator first." -msgstr "" +#: vendor/cakedc/users/src/Controller/Traits/OneTimePasswordVerifyTrait.php:129 +msgid "Could not verify, please try again" +msgstr "No se ha podido verificar, por favor, inténtelo de nuevo" -#: Controller/Traits/LoginTrait.php:287 +#: vendor/cakedc/users/src/Controller/Traits/OneTimePasswordVerifyTrait.php:161 msgid "Verification code is invalid. Try again" -msgstr "" +msgstr "La verificación del código no es válida, inténtalo de nuevo" -#: Controller/Traits/LoginTrait.php:340 -msgid "Username or password is incorrect" -msgstr "Usuario o contraseña incorrecta" +#: vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:64 +msgid "Changing another user's password is not allowed" +msgstr "Cambiar la contraseña de otro usuario no está permitido" -#: Controller/Traits/LoginTrait.php:363 -msgid "You've successfully logged out" -msgstr "Sesión finalizada correctamente" - -#: Controller/Traits/PasswordManagementTrait.php:49;82 -#: Controller/Traits/ProfileTrait.php:50 +#: vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:78 +#: vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:123 +#: vendor/cakedc/users/src/Controller/Traits/ProfileTrait.php:51 msgid "User was not found" msgstr "Usuario no encontrado" -#: Controller/Traits/PasswordManagementTrait.php:70;78;86 +#: vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:106 +#: vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:119 +#: vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:127 msgid "Password could not be changed" msgstr "No es posible cambiar la contraseña" -#: Controller/Traits/PasswordManagementTrait.php:74 +#: vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:115 msgid "Password has been changed successfully" msgstr "Contraseña cambiada correctamente" -#: Controller/Traits/PasswordManagementTrait.php:84 -msgid "{0}" -msgstr "{0}" - -#: Controller/Traits/PasswordManagementTrait.php:127 -msgid "Please check your email to continue with password reset process" -msgstr "" -"Por favor, comprueba tu correo para continuar con el proceso de " -"restablecimiento de contraseña" - -#: Controller/Traits/PasswordManagementTrait.php:130 Shell/UsersShell.php:247 -msgid "The password token could not be generated. Please try again" +#: vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:169 +#: vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:181 +msgid "" +"If the account is valid, the system will send an instructional email to the " +"address on record." msgstr "" -"No se pudo generar el token de contraseña. Por favor, inténtalo de nuevo" - -#: Controller/Traits/PasswordManagementTrait.php:136 -#: Controller/Traits/UserValidationTrait.php:107 -msgid "User {0} was not found" -msgstr "Usuario {0} no encontrado" - -#: Controller/Traits/PasswordManagementTrait.php:138 -msgid "The user is not active" -msgstr "El usuario no está activo" +"Si la cuenta no es válida, el sistema enviará un email instructivo a la " +"dirección del registro." -#: Controller/Traits/PasswordManagementTrait.php:140 -#: Controller/Traits/UserValidationTrait.php:102;111 -msgid "Token could not be reset" -msgstr "No se puede restablecer el token" +#: vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:175 +#: vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:187 +msgid "There was an error please contact Administrator" +msgstr "Se ha producido un error, por favor, contacto con un administrador." -#: Controller/Traits/PasswordManagementTrait.php:164 -#, fuzzy +#: vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:212 msgid "Google Authenticator token was successfully reset" -msgstr "Restablecimiento del token de contraseña validado correctamente" +msgstr "El token del autenticador de Google ha sido reiniciado correctamente" -#: Controller/Traits/ProfileTrait.php:54 +#: vendor/cakedc/users/src/Controller/Traits/PasswordManagementTrait.php:215 +msgid "Could not reset Google Authenticator" +msgstr "No se ha podido reiniciar el token de autenticación de Google" + +#: vendor/cakedc/users/src/Controller/Traits/ProfileTrait.php:55 msgid "Not authorized, please login first" msgstr "" "No estás autorizado para realizar esta acción, por favor inicia sesión " "primero" -#: Controller/Traits/RegisterTrait.php:43 +#: vendor/cakedc/users/src/Controller/Traits/RegisterTrait.php:47 msgid "You must log out to register a new user account" msgstr "Debes finalizar la sesión para registrar una nueva cuenta de usuario" -#: Controller/Traits/RegisterTrait.php:89 +#: vendor/cakedc/users/src/Controller/Traits/RegisterTrait.php:86 +#: vendor/cakedc/users/src/Controller/Traits/RegisterTrait.php:117 msgid "The user could not be saved" msgstr "No se ha podido guardar el usuario" -#: Controller/Traits/RegisterTrait.php:123 +#: vendor/cakedc/users/src/Controller/Traits/RegisterTrait.php:103 +#: vendor/cakedc/users/src/Loader/LoginComponentLoader.php:33 +msgid "Invalid reCaptcha" +msgstr "El código reCaptcha no es válido" + +#: vendor/cakedc/users/src/Controller/Traits/RegisterTrait.php:151 msgid "You have registered successfully, please log in" msgstr "Registrado correctamente, por favor inicia sesión" -#: Controller/Traits/RegisterTrait.php:125 +#: vendor/cakedc/users/src/Controller/Traits/RegisterTrait.php:153 msgid "Please validate your account before log in" msgstr "Por favor, valida tu cuenta antes de iniciar sesión" -#: Controller/Traits/SimpleCrudTrait.php:77;107 +#: vendor/cakedc/users/src/Controller/Traits/SimpleCrudTrait.php:75 +#: vendor/cakedc/users/src/Controller/Traits/SimpleCrudTrait.php:105 msgid "The {0} has been saved" msgstr "El {0} ha sido guardado" -#: Controller/Traits/SimpleCrudTrait.php:81;111 +#: vendor/cakedc/users/src/Controller/Traits/SimpleCrudTrait.php:79 +#: vendor/cakedc/users/src/Controller/Traits/SimpleCrudTrait.php:109 msgid "The {0} could not be saved" msgstr "El {0} no ha podido guardarse" -#: Controller/Traits/SimpleCrudTrait.php:131 +#: vendor/cakedc/users/src/Controller/Traits/SimpleCrudTrait.php:129 msgid "The {0} has been deleted" msgstr "El {0} ha sido eliminado" -#: Controller/Traits/SimpleCrudTrait.php:133 +#: vendor/cakedc/users/src/Controller/Traits/SimpleCrudTrait.php:131 msgid "The {0} could not be deleted" msgstr "El {0} no ha podido eliminarse" -#: Controller/Traits/SocialTrait.php:40 -msgid "The reCaptcha could not be validated" -msgstr "El código reCaptcha no se pudo validar" - -#: Controller/Traits/UserValidationTrait.php:43 +#: vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:54 msgid "User account validated successfully" msgstr "Cuenta de usuario validada correctamente" -#: Controller/Traits/UserValidationTrait.php:45 +#: vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:56 msgid "User account could not be validated" msgstr "No se pudo validar la cuenta de usuario" -#: Controller/Traits/UserValidationTrait.php:48 +#: vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:59 msgid "User already active" msgstr "Usuario ya activo" -#: Controller/Traits/UserValidationTrait.php:54 +#: vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:65 msgid "Reset password token was validated successfully" msgstr "Restablecimiento del token de contraseña validado correctamente" -#: Controller/Traits/UserValidationTrait.php:62 +#: vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:73 msgid "Reset password token could not be validated" msgstr "Restablecimiento del token de contraseña no pudo validarse" -#: Controller/Traits/UserValidationTrait.php:66 +#: vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:77 msgid "Invalid validation type" msgstr "Tipo de validación inválido" -#: Controller/Traits/UserValidationTrait.php:69 +#: vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:80 msgid "Invalid token or user account already validated" msgstr "Token inválido, o tu cuenta ya había sido validada anteriormente" -#: Controller/Traits/UserValidationTrait.php:71 +#: vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:87 msgid "Token already expired" msgstr "Token ya expirado" -#: Controller/Traits/UserValidationTrait.php:97 +#: vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:120 msgid "Token has been reset successfully. Please check your email." msgstr "" "Se ha restablecido el token correctamente. Por favor comprueba tu email." -#: Controller/Traits/UserValidationTrait.php:109 +#: vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:125 +#: vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:134 +msgid "Token could not be reset" +msgstr "No se puede restablecer el token" + +#: vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:130 +msgid "User {0} was not found" +msgstr "Usuario {0} no encontrado" + +#: vendor/cakedc/users/src/Controller/Traits/UserValidationTrait.php:132 msgid "User {0} is already active" msgstr "El usuario {0} ya está activo" -#: Mailer/UsersMailer.php:34 +#: vendor/cakedc/users/src/Controller/Traits/Webauthn2faTrait.php:55 +#: vendor/cakedc/users/src/Controller/Traits/Webauthn2faTrait.php:76 +msgid "User already has configured webauthn2fa" +msgstr "El usuario ya ha configurado WebAuthn2fa" + +#: vendor/cakedc/users/src/Controller/Traits/Webauthn2faTrait.php:80 +#: vendor/cakedc/users/src/Controller/Traits/Webauthn2faTrait.php:127 +msgid "Register error with webauthn for user id: {0}" +msgstr "Error en el registro con WebAuthn2fa para el usuario con id: {0}" + +#: vendor/cakedc/users/src/Identifier/PasswordLockout/LockoutHandler.php:156 +msgid "Config \"timeWindowInSeconds\" must be integer greater than 60" +msgstr "La configuración \"timeWindowInSeconds\" debe ser un entero mayor a 60" + +#: vendor/cakedc/users/src/Identifier/PasswordLockout/LockoutHandler.php:173 +msgid "Config \"numberOfAttemptsFail\" must be integer greater or equal 0" +msgstr "" +"La configuración \"numberOfAttemptsFail\" debe ser un entero mayor o igual a " +"60" + +#: vendor/cakedc/users/src/Identifier/PasswordLockout/LockoutHandler.php:191 +msgid "Config \"lockoutTimeInSeconds\" must be integer greater than 60" +msgstr "" +"La configuración \"lockoutTimeInSeconds\" debe ser un entero mayor a 60" + +#: vendor/cakedc/users/src/Identifier/PasswordLockoutIdentifier.php:73 +msgid "Lockout handler has not been set." +msgstr "El controlador de bloqueo no ha sido definido" + +#: vendor/cakedc/users/src/Identifier/PasswordLockoutIdentifier.php:89 +msgid "Option `className` for lockout handler is not present." +msgstr "La opción `className` para el controlador de bloqueo no existe" + +#: vendor/cakedc/users/src/Loader/AuthenticationServiceLoader.php:109 +msgid "Property {0}.className should be defined" +msgstr "La propiedad {0}.className debe estar definida" + +#: vendor/cakedc/users/src/Loader/LoginComponentLoader.php:31 +msgid "Username or password is incorrect" +msgstr "Usuario o contraseña incorrecta" + +#: vendor/cakedc/users/src/Loader/LoginComponentLoader.php:52 +msgid "Could not proceed with social account. Please try again" +msgstr "" +"No se ha podido proceder con la cuenta social. Por favor, inténtelo de nuevo" + +#: vendor/cakedc/users/src/Loader/LoginComponentLoader.php:54 +msgid "" +"Your user has not been validated yet. Please check your inbox for " +"instructions" +msgstr "" +"El usuario no se ha validado todavía. Instrucciones enviadas a tu bandeja de " +"entrada" + +#: vendor/cakedc/users/src/Loader/LoginComponentLoader.php:58 +msgid "" +"Your social account has not been validated yet. Please check your inbox for " +"instructions" +msgstr "" +"La cuenta social no se ha validado todavía. Instrucciones enviadas a tu " +"bandeja de entrada" + +#: vendor/cakedc/users/src/Mailer/UsersMailer.php:36 msgid "Your account validation link" msgstr "Enlace para validar tu cuenta" -#: Mailer/UsersMailer.php:52 +#: vendor/cakedc/users/src/Mailer/UsersMailer.php:71 msgid "{0}Your reset password link" msgstr "{0} Enlace para restablecer tu contraseña" -#: Mailer/UsersMailer.php:75 +#: vendor/cakedc/users/src/Mailer/UsersMailer.php:110 msgid "{0}Your social account validation link" msgstr "{0} Enlace de validación de tu cuenta social" -#: Model/Behavior/AuthFinderBehavior.php:49 +#: vendor/cakedc/users/src/Middleware/SocialAuthMiddleware.php:47 +#: vendor/cakedc/users/templates/Users/social_email.php:16 +msgid "Please enter your email" +msgstr "Por favor, introduce tu email" + +#: vendor/cakedc/users/src/Middleware/SocialAuthMiddleware.php:57 +msgid "Could not identify your account, please try again" +msgstr "No se pudo identificar su cuenta. Por favor, inténtalo de nuevo" + +#: vendor/cakedc/users/src/Middleware/UnauthorizedHandler/DefaultRedirectHandler.php:125 +msgid "Location = {0}" +msgstr "Ubicación = {0}" + +#: vendor/cakedc/users/src/Middleware/UnauthorizedHandler/DefaultRedirectHandler.php:129 +msgid "You are not authorized to access that location." +msgstr "No está autorizado a acceder a ese sitio." + +#: vendor/cakedc/users/src/Model/Behavior/AuthFinderBehavior.php:50 msgid "Missing 'username' in options data" msgstr "Falta 'username' en las opciones" -#: Model/Behavior/LinkSocialBehavior.php:53 +#: vendor/cakedc/users/src/Model/Behavior/LinkSocialBehavior.php:50 msgid "Social account already associated to another user" -msgstr "" +msgstr "La cuenta social ya esta asociada a otro usuario" -#: Model/Behavior/PasswordBehavior.php:45 +#: vendor/cakedc/users/src/Model/Behavior/PasswordBehavior.php:45 msgid "Reference cannot be null" msgstr "La referencia no puede estar vacía" -#: Model/Behavior/PasswordBehavior.php:50 +#: vendor/cakedc/users/src/Model/Behavior/PasswordBehavior.php:50 msgid "Token expiration cannot be empty" msgstr "La fecha de expiración del Token no puede estar vacía" -#: Model/Behavior/PasswordBehavior.php:56;117 +#: vendor/cakedc/users/src/Model/Behavior/PasswordBehavior.php:56 +#: vendor/cakedc/users/src/Model/Behavior/PasswordBehavior.php:140 msgid "User not found" msgstr "Usuario no encontrado" -#: Model/Behavior/PasswordBehavior.php:60 -#: Model/Behavior/RegisterBehavior.php:112;205 +#: vendor/cakedc/users/src/Model/Behavior/PasswordBehavior.php:60 +#: vendor/cakedc/users/src/Model/Behavior/RegisterBehavior.php:129 msgid "User account already validated" msgstr "Tu usuario ya se había validado antes" -#: Model/Behavior/PasswordBehavior.php:67 +#: vendor/cakedc/users/src/Model/Behavior/PasswordBehavior.php:66 msgid "User not active" msgstr "El usuario no está activo" -#: Model/Behavior/PasswordBehavior.php:122 +#: vendor/cakedc/users/src/Model/Behavior/PasswordBehavior.php:145 msgid "The current password does not match" msgstr "La contraseña actual no coincide" -#: Model/Behavior/PasswordBehavior.php:125 +#: vendor/cakedc/users/src/Model/Behavior/PasswordBehavior.php:148 msgid "You cannot use the current password as the new one" msgstr "No puedes usar tu contraseña actual como nueva contraseña" -#: Model/Behavior/RegisterBehavior.php:90 +#: vendor/cakedc/users/src/Model/Behavior/RegisterBehavior.php:107 msgid "User not found for the given token and email." msgstr "Usuario no encontrado para el token y email proporcionado" -#: Model/Behavior/RegisterBehavior.php:93 +#: vendor/cakedc/users/src/Model/Behavior/RegisterBehavior.php:110 msgid "Token has already expired user with no token" msgstr "El token ha expirado usuario sin token" -#: Model/Behavior/SocialAccountBehavior.php:103;130 +#: vendor/cakedc/users/src/Model/Behavior/RegisterBehavior.php:167 +msgid "This field is required" +msgstr "Éste campo es requerido" + +#: vendor/cakedc/users/src/Model/Behavior/SocialAccountBehavior.php:104 +#: vendor/cakedc/users/src/Model/Behavior/SocialAccountBehavior.php:134 msgid "Account already validated" msgstr "Cuenta ya activada" -#: Model/Behavior/SocialAccountBehavior.php:106;133 +#: vendor/cakedc/users/src/Model/Behavior/SocialAccountBehavior.php:108 +#: vendor/cakedc/users/src/Model/Behavior/SocialAccountBehavior.php:139 msgid "Account not found for the given token and email." msgstr "Cuenta no encontrada para el token y email proporcionado" -#: Model/Behavior/SocialBehavior.php:82 +#: vendor/cakedc/users/src/Model/Behavior/SocialBehavior.php:94 msgid "Unable to login user with reference {0}" msgstr "No se puede iniciar sesión con el usuario con referencia {0}" -#: Model/Behavior/SocialBehavior.php:121 +#: vendor/cakedc/users/src/Model/Behavior/SocialBehavior.php:144 msgid "Email not present" msgstr "No se encuentra el email" -#: Model/Table/UsersTable.php:81 +#: vendor/cakedc/users/src/Model/Table/UsersTable.php:108 msgid "Your password does not match your confirm password. Please try again" msgstr "" "La contraseña y la comprobación no concuerdan. Por favor inténtalo de nuevo" -#: Model/Table/UsersTable.php:173 +#: vendor/cakedc/users/src/Model/Table/UsersTable.php:202 msgid "Username already exists" msgstr "Nombre de usuario ya existente" -#: Model/Table/UsersTable.php:179 +#: vendor/cakedc/users/src/Model/Table/UsersTable.php:208 msgid "Email already exists" msgstr "Email ya existente" -#: Shell/UsersShell.php:58 -msgid "Utilities for CakeDC Users Plugin" -msgstr "Utilidades para CakeDC Users Plugin" - -#: Shell/UsersShell.php:60 -msgid "Activate an specific user" -msgstr "Activar un usuario específico" - -#: Shell/UsersShell.php:63 -msgid "Add a new superadmin user for testing purposes" -msgstr "Añadir un nuevo superadmin" - -#: Shell/UsersShell.php:66 -msgid "Add a new user" -msgstr "Añadir un nuevo usuario" - -#: Shell/UsersShell.php:69 -msgid "Change the role for an specific user" -msgstr "Cambiar el rol de un usuario específico" - -#: Shell/UsersShell.php:72 -msgid "Deactivate an specific user" -msgstr "Desactivar un usuario" - -#: Shell/UsersShell.php:75 -msgid "Delete an specific user" -msgstr "Borrar un usuario" - -#: Shell/UsersShell.php:78 -msgid "Reset the password via email" -msgstr "Restablecer la contraseña vía email" - -#: Shell/UsersShell.php:81 -msgid "Reset the password for all users" -msgstr "Restablecer la contraseña de todos los usuarios" - -#: Shell/UsersShell.php:84 -msgid "Reset the password for an specific user" -msgstr "Restablecer la contraseña de un usuario concreto" - -#: Shell/UsersShell.php:133;159 -msgid "Please enter a password." -msgstr "Por favor, introduce una contraseña." - -#: Shell/UsersShell.php:137 -msgid "Password changed for all users" -msgstr "Contraseña cambiada para todos los usuarios" - -#: Shell/UsersShell.php:138;166 -msgid "New password: {0}" -msgstr "Nueva contraseña: {0}" - -#: Shell/UsersShell.php:156;184;262;359 -msgid "Please enter a username." -msgstr "Por favor introduce el nombre de usuario." - -#: Shell/UsersShell.php:165 -msgid "Password changed for user: {0}" -msgstr "Contraseña cambiada para el usuario: {0}" - -#: Shell/UsersShell.php:187 -msgid "Please enter a role." -msgstr "Por favor introduce el rol." - -#: Shell/UsersShell.php:193 -msgid "Role changed for user: {0}" -msgstr "Rol cambiado para el usuario: {0}" - -#: Shell/UsersShell.php:194 -msgid "New role: {0}" -msgstr "Nuevo rol: {0}" - -#: Shell/UsersShell.php:209 -msgid "User was activated: {0}" -msgstr "Usuario activado: {0}" - -#: Shell/UsersShell.php:224 -msgid "User was de-activated: {0}" -msgstr "Usuario desactivado: {0}" +#: vendor/cakedc/users/src/View/Helper/UserHelper.php:49 +msgid "Sign in with" +msgstr "Iniciar sesión con" -#: Shell/UsersShell.php:236 -msgid "Please enter a username or email." -msgstr "Por favor introduce el nombre de usuario o email." +#: vendor/cakedc/users/src/View/Helper/UserHelper.php:112 +msgid "Logout" +msgstr "Salir" -#: Shell/UsersShell.php:244 -msgid "" -"Please ask the user to check the email to continue with password reset " -"process" +#: vendor/cakedc/users/src/View/Helper/UserHelper.php:200 +msgid "reCaptcha is not configured! Please configure Users.reCaptcha.key" msgstr "" -"Por favor, pide al usuario que mire su buzón de correo para continuar con el " -"proceso de restablecimiento de su contraseña" - -#: Shell/UsersShell.php:308 -msgid "Superuser added:" -msgstr "Superusuario añadido:" - -#: Shell/UsersShell.php:310 -msgid "User added:" -msgstr "Usuario añadido:" - -#: Shell/UsersShell.php:312 -msgid "Id: {0}" -msgstr "Id: {0}" - -#: Shell/UsersShell.php:313 -msgid "Username: {0}" -msgstr "Nombre de usuario: {0}" - -#: Shell/UsersShell.php:314 -msgid "Email: {0}" -msgstr "Email: {0}" - -#: Shell/UsersShell.php:315 -#, fuzzy -msgid "Role: {0}" -msgstr "Nuevo rol: {0}" - -#: Shell/UsersShell.php:316 -msgid "Password: {0}" -msgstr "Contraseña: {0}" - -#: Shell/UsersShell.php:318 -#, fuzzy -msgid "User could not be added:" -msgstr "No se pudo añadir un superusuario:" - -#: Shell/UsersShell.php:321 -msgid "Field: {0} Error: {1}" -msgstr "Campo: {0} Error: {1}" - -#: Shell/UsersShell.php:337 -msgid "The user was not found." -msgstr "Usuario no encontrado." - -#: Shell/UsersShell.php:367 -msgid "The user {0} was not deleted. Please try again" -msgstr "El usuario {0} no ha sido borrado. Inténtalo de nuevo por favor" - -#: Shell/UsersShell.php:369 -msgid "The user {0} was deleted successfully" -msgstr "El usuario {0} se borró correctamente" - -#: Template/Email/html/reset_password.ctp:21 -#: Template/Email/html/social_account_validation.ctp:14 -#: Template/Email/html/validation.ctp:21 -#: Template/Email/text/reset_password.ctp:20 -#: Template/Email/text/social_account_validation.ctp:22 -#: Template/Email/text/validation.ctp:20 -msgid "Hi {0}" -msgstr "Hola {0}" - -#: Template/Email/html/reset_password.ctp:24 -msgid "Reset your password here" -msgstr "Restablece tu contraseña aquí" +"reCaptcha no se ha configurado, por favor configura Users.reCaptcha.key" -#: Template/Email/html/reset_password.ctp:27 -#: Template/Email/html/social_account_validation.ctp:32 -#: Template/Email/html/validation.ctp:27 -#, fuzzy +#: vendor/cakedc/users/src/View/Helper/UserHelper.php:218 msgid "" -"If the link is not correctly displayed, please copy the following address in " -"your web browser {0}" +"reCaptcha version is wrong. Please configure Users.reCaptcha.version as 2 or " +"3" msgstr "" -"Por favor, copia la siguiente dirección en tu navegador si el enlace no se " -"ve correctamente {0}" - -#: Template/Email/html/reset_password.ctp:34 -#: Template/Email/html/social_account_validation.ctp:39 -#: Template/Email/html/validation.ctp:34 -#: Template/Email/text/reset_password.ctp:28 -#: Template/Email/text/social_account_validation.ctp:30 -#: Template/Email/text/validation.ctp:28 -msgid "Thank you" -msgstr "Gracias" - -#: Template/Email/html/social_account_validation.ctp:18 -msgid "Activate your social login here" -msgstr "Activa tu acceso social aquí" +"La versión de reCaptcha es incorrecta, por favor configura Users.reCaptcha." +"version como 2 o 3" -#: Template/Email/html/validation.ctp:24 -msgid "Activate your account here" -msgstr "Activa tu cuenta aquí" +#: vendor/cakedc/users/src/View/Helper/UserHelper.php:304 +msgid "Connected with {0}" +msgstr "Conectado con {0}" -#: Template/Email/text/reset_password.ctp:22 -#: Template/Email/text/validation.ctp:22 -msgid "Please copy the following address in your web browser {0}" -msgstr "Por favor copia la siguiente dirección en tu navegador {0}" +#: vendor/cakedc/users/src/View/Helper/UserHelper.php:309 +msgid "Connect with {0}" +msgstr "Conectar con {0}" -#: Template/Email/text/social_account_validation.ctp:24 -msgid "" -"Please copy the following address in your web browser to activate your " -"social login {0}" +#: vendor/cakedc/users/src/Webauthn/AuthenticateAdapter.php:79 +msgid "Could not validate credential response for authentication" msgstr "" -"Por favor copia la siguiente dirección en tu navegador para activar tu " -"acceso social {0}" +"No se ha podido validar la respuesta de credenciales para la autenticación" + +#: vendor/cakedc/users/src/Webauthn/RegisterAdapter.php:84 +msgid "Could not credential response for registration" +msgstr "No se ha podido validar la respuesta de credenciales para el registro" -#: Template/Users/add.ctp:13 Template/Users/edit.ctp:16 -#: Template/Users/index.ctp:13;26 Template/Users/view.ctp:15 +#: vendor/cakedc/users/templates/Users/add.php:13 +#: vendor/cakedc/users/templates/Users/edit.php:17 +#: vendor/cakedc/users/templates/Users/index.php:13 +#: vendor/cakedc/users/templates/Users/index.php:26 +#: vendor/cakedc/users/templates/Users/view.php:15 msgid "Actions" msgstr "Acciones" -#: Template/Users/add.ctp:15 Template/Users/edit.ctp:27 -#: Template/Users/view.ctp:23 +#: vendor/cakedc/users/templates/Users/add.php:15 +#: vendor/cakedc/users/templates/Users/edit.php:28 +#: vendor/cakedc/users/templates/Users/view.php:23 msgid "List Users" msgstr "Listar Usuarios" -#: Template/Users/add.ctp:21 Template/Users/register.ctp:17 +#: vendor/cakedc/users/templates/Users/add.php:21 +#: vendor/cakedc/users/templates/Users/register.php:18 msgid "Add User" msgstr "Añadir Usuario" -#: Template/Users/add.ctp:23 Template/Users/edit.ctp:35 -#: Template/Users/index.ctp:22 Template/Users/profile.ctp:30 -#: Template/Users/register.ctp:19 Template/Users/view.ctp:33 +#: vendor/cakedc/users/templates/Users/add.php:23 +#: vendor/cakedc/users/templates/Users/edit.php:36 +#: vendor/cakedc/users/templates/Users/index.php:22 +#: vendor/cakedc/users/templates/Users/login.php:20 +#: vendor/cakedc/users/templates/Users/profile.php:31 +#: vendor/cakedc/users/templates/Users/register.php:20 +#: vendor/cakedc/users/templates/Users/view.php:33 msgid "Username" msgstr "Usuario" -#: Template/Users/add.ctp:24 Template/Users/edit.ctp:36 -#: Template/Users/index.ctp:23 Template/Users/profile.ctp:32 -#: Template/Users/register.ctp:20 Template/Users/view.ctp:35 +#: vendor/cakedc/users/templates/Users/add.php:24 +#: vendor/cakedc/users/templates/Users/edit.php:37 +#: vendor/cakedc/users/templates/Users/index.php:23 +#: vendor/cakedc/users/templates/Users/profile.php:33 +#: vendor/cakedc/users/templates/Users/register.php:21 +#: vendor/cakedc/users/templates/Users/view.php:35 msgid "Email" msgstr "Email" -#: Template/Users/add.ctp:25 Template/Users/register.ctp:21 +#: vendor/cakedc/users/templates/Users/add.php:25 +#: vendor/cakedc/users/templates/Users/login.php:21 +#: vendor/cakedc/users/templates/Users/register.php:22 msgid "Password" msgstr "Contraseña" -#: Template/Users/add.ctp:26 Template/Users/edit.ctp:37 -#: Template/Users/index.ctp:24 Template/Users/register.ctp:26 +#: vendor/cakedc/users/templates/Users/add.php:26 +#: vendor/cakedc/users/templates/Users/edit.php:38 +#: vendor/cakedc/users/templates/Users/index.php:24 +#: vendor/cakedc/users/templates/Users/register.php:31 msgid "First name" msgstr "Nombre" -#: Template/Users/add.ctp:27 Template/Users/edit.ctp:38 -#: Template/Users/index.ctp:25 Template/Users/register.ctp:27 +#: vendor/cakedc/users/templates/Users/add.php:27 +#: vendor/cakedc/users/templates/Users/edit.php:39 +#: vendor/cakedc/users/templates/Users/index.php:25 +#: vendor/cakedc/users/templates/Users/register.php:32 msgid "Last name" msgstr "Apellidos" -#: Template/Users/add.ctp:30 Template/Users/edit.ctp:53 -#: Template/Users/view.ctp:49;74 +#: vendor/cakedc/users/templates/Users/add.php:30 +#: vendor/cakedc/users/templates/Users/edit.php:54 +#: vendor/cakedc/users/templates/Users/view.php:49 +#: vendor/cakedc/users/templates/Users/view.php:74 msgid "Active" msgstr "Activo" -#: Template/Users/add.ctp:34 Template/Users/change_password.ctp:25 -#: Template/Users/edit.ctp:57 Template/Users/register.ctp:36 -#: Template/Users/request_reset_password.ctp:8 -#: Template/Users/resend_token_validation.ctp:20 -#: Template/Users/social_email.ctp:19 +#: vendor/cakedc/users/templates/Users/add.php:34 +#: vendor/cakedc/users/templates/Users/change_password.php:29 +#: vendor/cakedc/users/templates/Users/edit.php:58 +#: vendor/cakedc/users/templates/Users/register.php:41 +#: vendor/cakedc/users/templates/Users/request_reset_password.php:23 +#: vendor/cakedc/users/templates/Users/resend_token_validation.php:20 +#: vendor/cakedc/users/templates/Users/social_email.php:19 msgid "Submit" msgstr "Enviar" -#: Template/Users/change_password.ctp:5 +#: vendor/cakedc/users/templates/Users/change_password.php:5 msgid "Please enter the new password" msgstr "Por favor introduce la nueva contraseña" -#: Template/Users/change_password.ctp:10 +#: vendor/cakedc/users/templates/Users/change_password.php:10 msgid "Current password" msgstr "Contraseña actual" -#: Template/Users/change_password.ctp:16 +#: vendor/cakedc/users/templates/Users/change_password.php:17 msgid "New password" msgstr "Nueva contraseña" -#: Template/Users/change_password.ctp:21 Template/Users/register.ctp:24 +#: vendor/cakedc/users/templates/Users/change_password.php:25 +#: vendor/cakedc/users/templates/Users/register.php:29 msgid "Confirm password" msgstr "Confirmar contraseña" -#: Template/Users/edit.ctp:21 Template/Users/index.ctp:40 +#: vendor/cakedc/users/templates/Users/edit.php:22 +#: vendor/cakedc/users/templates/Users/index.php:40 msgid "Delete" msgstr "Eliminar" -#: Template/Users/edit.ctp:23 Template/Users/index.ctp:40 -#: Template/Users/view.ctp:21 +#: vendor/cakedc/users/templates/Users/edit.php:24 +#: vendor/cakedc/users/templates/Users/index.php:40 +#: vendor/cakedc/users/templates/Users/view.php:21 msgid "Are you sure you want to delete # {0}?" msgstr "¿Está seguro de que quieres eliminar # {0}?" -#: Template/Users/edit.ctp:33 Template/Users/view.ctp:17 +#: vendor/cakedc/users/templates/Users/edit.php:34 +#: vendor/cakedc/users/templates/Users/view.php:17 msgid "Edit User" msgstr "Editar Usuario" -#: Template/Users/edit.ctp:39 Template/Users/view.ctp:43 +#: vendor/cakedc/users/templates/Users/edit.php:40 +#: vendor/cakedc/users/templates/Users/view.php:43 msgid "Token" msgstr "Token" -#: Template/Users/edit.ctp:41 +#: vendor/cakedc/users/templates/Users/edit.php:42 msgid "Token expires" msgstr "Token caduca" -#: Template/Users/edit.ctp:44 +#: vendor/cakedc/users/templates/Users/edit.php:45 msgid "API token" msgstr "Api Token" -#: Template/Users/edit.ctp:47 +#: vendor/cakedc/users/templates/Users/edit.php:48 msgid "Activation date" msgstr "Fecha de activación" -#: Template/Users/edit.ctp:50 +#: vendor/cakedc/users/templates/Users/edit.php:51 msgid "TOS date" msgstr "Fecha TOS" -#: Template/Users/edit.ctp:63 -#, fuzzy +#: vendor/cakedc/users/templates/Users/edit.php:64 msgid "Reset Google Authenticator Token" -msgstr "Restablecimiento del token de contraseña validado correctamente" +msgstr "Reiniciar el token del autenticador de Google" -#: Template/Users/edit.ctp:69 +#: vendor/cakedc/users/templates/Users/edit.php:70 msgid "Are you sure you want to reset token for user \"{0}\"?" -msgstr "" +msgstr "¿Estás seguro de querer reiniciar el token para el usuario \"{0}\"?" -#: Template/Users/index.ctp:15 +#: vendor/cakedc/users/templates/Users/index.php:15 msgid "New {0}" msgstr "Nuevo {0}" -#: Template/Users/index.ctp:37 +#: vendor/cakedc/users/templates/Users/index.php:37 msgid "View" msgstr "Ver" -#: Template/Users/index.ctp:38 +#: vendor/cakedc/users/templates/Users/index.php:38 msgid "Change password" msgstr "Cambiar contraseña" -#: Template/Users/index.ctp:39 +#: vendor/cakedc/users/templates/Users/index.php:39 msgid "Edit" msgstr "Editar" -#: Template/Users/index.ctp:49 +#: vendor/cakedc/users/templates/Users/index.php:49 msgid "previous" msgstr "anterior" -#: Template/Users/index.ctp:51 +#: vendor/cakedc/users/templates/Users/index.php:51 msgid "next" msgstr "siguiente" -#: Template/Users/login.ctp:19 +#: vendor/cakedc/users/templates/Users/login.php:19 msgid "Please enter your username and password" msgstr "Por favor introduce tu usuario y contraseña" -#: Template/Users/login.ctp:29 +#: vendor/cakedc/users/templates/Users/login.php:29 msgid "Remember me" msgstr "Recuérdame" -#: Template/Users/login.ctp:37 +#: vendor/cakedc/users/templates/Users/login.php:37 msgid "Register" msgstr "Registrarse" -#: Template/Users/login.ctp:43 +#: vendor/cakedc/users/templates/Users/login.php:43 msgid "Reset Password" msgstr "Cambiar contraseña" -#: Template/Users/login.ctp:48 +#: vendor/cakedc/users/templates/Users/login.php:48 msgid "Login" msgstr "Iniciar sesión" -#: Template/Users/profile.ctp:21 View/Helper/UserHelper.php:54 +#: vendor/cakedc/users/templates/Users/profile.php:21 msgid "{0} {1}" msgstr "{0} {1}" -#: Template/Users/profile.ctp:27 -#, fuzzy +#: vendor/cakedc/users/templates/Users/profile.php:27 msgid "Change Password" msgstr "Cambiar contraseña" -#: Template/Users/profile.ctp:38 Template/Users/view.ctp:68 +#: vendor/cakedc/users/templates/Users/profile.php:39 +#: vendor/cakedc/users/templates/Users/view.php:68 msgid "Social Accounts" msgstr "Cuentas sociales" -#: Template/Users/profile.ctp:42 Template/Users/view.ctp:73 +#: vendor/cakedc/users/templates/Users/profile.php:43 +#: vendor/cakedc/users/templates/Users/view.php:73 msgid "Avatar" msgstr "Avatar" -#: Template/Users/profile.ctp:43 Template/Users/view.ctp:72 +#: vendor/cakedc/users/templates/Users/profile.php:44 +#: vendor/cakedc/users/templates/Users/view.php:72 msgid "Provider" msgstr "Proveedor" -#: Template/Users/profile.ctp:44 +#: vendor/cakedc/users/templates/Users/profile.php:45 msgid "Link" msgstr "Enlace" -#: Template/Users/profile.ctp:51 +#: vendor/cakedc/users/templates/Users/profile.php:52 msgid "Link to {0}" msgstr "Enlace a {0}" -#: Template/Users/register.ctp:29 +#: vendor/cakedc/users/templates/Users/register.php:34 msgid "Accept TOS conditions?" msgstr "¿Aceptas las condiciones del servicios?" -#: Template/Users/request_reset_password.ctp:5 -msgid "Please enter your email to reset your password" -msgstr "Por favor introduce tu email para restablecer tu contraseña" +#: vendor/cakedc/users/templates/Users/request_reset_password.php:20 +msgid "Please enter your email or username to reset your password" +msgstr "" +"Por favor introduce tu email o nombre de usuario para reiniciar tu contraseña" -#: Template/Users/resend_token_validation.ctp:15 +#: vendor/cakedc/users/templates/Users/resend_token_validation.php:15 msgid "Resend Validation email" msgstr "Reenviar email de validación" -#: Template/Users/resend_token_validation.ctp:17 +#: vendor/cakedc/users/templates/Users/resend_token_validation.php:17 msgid "Email or username" msgstr "Email o usuario" -#: Template/Users/verify.ctp:13 +#: vendor/cakedc/users/templates/Users/verify.php:13 msgid "Verification Code" -msgstr "" +msgstr "Código de verificacion" -#: Template/Users/verify.ctp:15 +#: vendor/cakedc/users/templates/Users/verify.php:15 msgid "" " " "Verify" msgstr "" +" " +"Verificar" -#: Template/Users/view.ctp:19 +#: vendor/cakedc/users/templates/Users/view.php:19 msgid "Delete User" msgstr "Eliminar Usuario" -#: Template/Users/view.ctp:24 +#: vendor/cakedc/users/templates/Users/view.php:24 msgid "New User" msgstr "Nuevo Usuario" -#: Template/Users/view.ctp:31 +#: vendor/cakedc/users/templates/Users/view.php:31 msgid "Id" msgstr "Id" -#: Template/Users/view.ctp:37 -#, fuzzy +#: vendor/cakedc/users/templates/Users/view.php:37 msgid "First Name" msgstr "Nombre" -#: Template/Users/view.ctp:39 -#, fuzzy +#: vendor/cakedc/users/templates/Users/view.php:39 msgid "Last Name" msgstr "Apellidos" -#: Template/Users/view.ctp:41 -#, fuzzy +#: vendor/cakedc/users/templates/Users/view.php:41 msgid "Role" -msgstr "Nuevo rol: {0}" +msgstr "Rol" -#: Template/Users/view.ctp:45 -#, fuzzy +#: vendor/cakedc/users/templates/Users/view.php:45 msgid "Api Token" msgstr "Api Token" -#: Template/Users/view.ctp:53 -#, fuzzy +#: vendor/cakedc/users/templates/Users/view.php:53 msgid "Token Expires" -msgstr "Token caduca" +msgstr "Expiración de token" -#: Template/Users/view.ctp:55 -#, fuzzy +#: vendor/cakedc/users/templates/Users/view.php:55 msgid "Activation Date" msgstr "Fecha de activación" -#: Template/Users/view.ctp:57 +#: vendor/cakedc/users/templates/Users/view.php:57 msgid "Tos Date" msgstr "Fecha Tos" -#: Template/Users/view.ctp:59;75 +#: vendor/cakedc/users/templates/Users/view.php:59 +#: vendor/cakedc/users/templates/Users/view.php:75 msgid "Created" msgstr "Creado" -#: Template/Users/view.ctp:61;76 +#: vendor/cakedc/users/templates/Users/view.php:61 +#: vendor/cakedc/users/templates/Users/view.php:76 msgid "Modified" msgstr "Modificado" -#: View/Helper/UserHelper.php:45 -msgid "Sign in with" -msgstr "Iniciar sesión con" +#: vendor/cakedc/users/templates/Users/webauthn2fa.php:8 +msgid "Two-factor authentication" +msgstr "Autenticador en dos pasos" -#: View/Helper/UserHelper.php:48 -msgid "fa fa-{0}" -msgstr "fa fa-{0}" +#: vendor/cakedc/users/templates/Users/webauthn2fa.php:19 +msgid "Registering your yubico key" +msgstr "Registrando so llave Yubico" -#: View/Helper/UserHelper.php:57 -msgid "btn btn-social btn-{0} " -msgstr "btn btn-social btn-{0}" +#: vendor/cakedc/users/templates/Users/webauthn2fa.php:20 +#: vendor/cakedc/users/templates/Users/webauthn2fa.php:26 +msgid "Please insert and tap your yubico key" +msgstr "Por favor, inserte y toque su llave Yubico" -#: View/Helper/UserHelper.php:106 -msgid "Logout" -msgstr "Salir" +#: vendor/cakedc/users/templates/Users/webauthn2fa.php:21 +msgid "" +"In order to enable your YubiKey the first step is to perform a registration." +msgstr "Para habilitar su YubiKey, el primer paso es realizar el registro." -#: View/Helper/UserHelper.php:123 -msgid "Welcome, {0}" -msgstr "Bienvenido/a, {0}" +#: vendor/cakedc/users/templates/Users/webauthn2fa.php:22 +#: vendor/cakedc/users/templates/Users/webauthn2fa.php:28 +msgid "" +"When the YubiKey starts blinking, press the golden disc to activate it. " +"Depending on the web browser you might need to confirm the use of extended " +"information from the YubiKey." +msgstr "" +"Cuando el YubiKey empiece a parpadear, presione el disco dorado para " +"activarlo. Dependiendo del navegador, podría necesitar confirmar el uso de " +"información adicional de YubiKey." -#: View/Helper/UserHelper.php:146 -msgid "reCaptcha is not configured! Please configure Users.reCaptcha.key" +#: vendor/cakedc/users/templates/Users/webauthn2fa.php:25 +msgid "Verify your registered yubico key" +msgstr "Verifique su llave Yubico registrada" + +#: vendor/cakedc/users/templates/Users/webauthn2fa.php:27 +msgid "" +"You can now finish the authentication process using the registered device." msgstr "" -"reCaptcha no se ha configurado, por favor configura Users.reCaptcha.key" +"Ahora puede terminar el proceso de autenticación usando el dispositivo " +"registrado." + +#: vendor/cakedc/users/templates/Users/webauthn2fa.php:31 +msgid "Reload" +msgstr "Recargando" + +#: vendor/cakedc/users/templates/email/html/reset_password.php:14 +#: vendor/cakedc/users/templates/email/html/social_account_validation.php:14 +#: vendor/cakedc/users/templates/email/html/validation.php:13 +#: vendor/cakedc/users/templates/email/text/reset_password.php:12 +#: vendor/cakedc/users/templates/email/text/social_account_validation.php:12 +#: vendor/cakedc/users/templates/email/text/validation.php:12 +msgid "Hi {0}" +msgstr "Hola {0}" -#: View/Helper/UserHelper.php:205 -#, fuzzy -msgid "btn btn-social btn-{0}" -msgstr "btn btn-social btn-{0}" +#: vendor/cakedc/users/templates/email/html/reset_password.php:17 +msgid "Reset your password here" +msgstr "Restablece tu contraseña aquí" -#: View/Helper/UserHelper.php:211 -msgid "Connected with {0}" -msgstr "Conectado con {0}" +#: vendor/cakedc/users/templates/email/html/reset_password.php:20 +#: vendor/cakedc/users/templates/email/html/social_account_validation.php:23 +#: vendor/cakedc/users/templates/email/html/validation.php:19 +msgid "" +"If the link is not correctly displayed, please copy the following address in " +"your web browser {0}" +msgstr "" +"Si el enlace no se muestra correctamente, por favor, copia la siguiente " +"dirección en tu navegador {0}" + +#: vendor/cakedc/users/templates/email/html/reset_password.php:27 +#: vendor/cakedc/users/templates/email/html/social_account_validation.php:30 +#: vendor/cakedc/users/templates/email/html/validation.php:26 +#: vendor/cakedc/users/templates/email/text/reset_password.php:20 +#: vendor/cakedc/users/templates/email/text/social_account_validation.php:20 +#: vendor/cakedc/users/templates/email/text/validation.php:20 +msgid "Thank you" +msgstr "Gracias" -#: View/Helper/UserHelper.php:216 -msgid "Connect with {0}" -msgstr "Conectar con {0}" +#: vendor/cakedc/users/templates/email/html/social_account_validation.php:18 +msgid "Activate your social login here" +msgstr "Activa tu acceso social aquí" + +#: vendor/cakedc/users/templates/email/html/validation.php:16 +msgid "Activate your account here" +msgstr "Activa tu cuenta aquí" + +#: vendor/cakedc/users/templates/email/text/reset_password.php:14 +#: vendor/cakedc/users/templates/email/text/validation.php:14 +msgid "Please copy the following address in your web browser {0}" +msgstr "Por favor copia la siguiente dirección en tu navegador {0}" + +#: vendor/cakedc/users/templates/email/text/social_account_validation.php:14 +msgid "" +"Please copy the following address in your web browser to activate your " +"social login {0}" +msgstr "" +"Por favor copia la siguiente dirección en tu navegador para activar tu " +"acceso social {0}" + +#~ msgid "Provider cannot be empty" +#~ msgstr "El proveedor no puede ser vacío" + +#~ msgid "Invalid app salt, app salt must be at least 256 bits (32 bytes) long" +#~ msgstr "App salt inválido, debe contener al menos 256 bits (32 bytes)" + +#~ msgid "You can't enable email validation workflow if use_email is false" +#~ msgstr "" +#~ "No es posible activar el flujo de trabajo para la validación de email si " +#~ "use_mail es falso" + +#~ msgid "Issues trying to log in with your social account" +#~ msgstr "Hubo un problema al iniciar sesión con tu cuenta social" + +#~ msgid "You are already logged in" +#~ msgstr "Ya has iniciado sesión" + +#~ msgid "{0}" +#~ msgstr "{0}" + +#~ msgid "Please check your email to continue with password reset process" +#~ msgstr "" +#~ "Por favor, comprueba tu correo para continuar con el proceso de " +#~ "restablecimiento de contraseña" + +#~ msgid "The user is not active" +#~ msgstr "El usuario no está activo" + +#~ msgid "The reCaptcha could not be validated" +#~ msgstr "El código reCaptcha no se pudo validar" + +#~ msgid "Utilities for CakeDC Users Plugin" +#~ msgstr "Utilidades para CakeDC Users Plugin" + +#~ msgid "Add a new superadmin user for testing purposes" +#~ msgstr "Añadir un nuevo superadmin" + +#~ msgid "Add a new user" +#~ msgstr "Añadir un nuevo usuario" + +#~ msgid "fa fa-{0}" +#~ msgstr "fa fa-{0}" + +#~ msgid "btn btn-social btn-{0} " +#~ msgstr "btn btn-social btn-{0}" + +#, fuzzy +#~ msgid "btn btn-social btn-{0}" +#~ msgstr "btn btn-social btn-{0}" From 6954c7248a20162d89481641d356cd5d619681ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20P=C3=A9rez?= Date: Thu, 9 Jan 2025 15:39:30 +0000 Subject: [PATCH 25/29] update change log --- .semver | 2 +- CHANGELOG.md | 2 ++ README.md | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.semver b/.semver index 683f3209a..71dd10761 100644 --- a/.semver +++ b/.semver @@ -1,5 +1,5 @@ --- :major: 14 :minor: 3 -:patch: 1 +:patch: 2 :special: '' diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d32cbe57..99ba55c20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ Changelog ========= Releases for CakePHP 5 ------------- +* 14.3.2 +* Fix missing spanish translations * 14.3.1 * Fix duplicated rule name in rules checker * 14.3.0 diff --git a/README.md b/README.md index 58980549e..34063f939 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Versions and branches | CakePHP | CakeDC Users Plugin | Tag | Notes | |:--------------:|:----------------------------------------------------------:|:------:|:---------| -| ^5.0 | [14.2](https://github.com/cakedc/users/tree/14.next-cake5) | 14.3.1 | stable | +| ^5.0 | [14.3](https://github.com/cakedc/users/tree/14.next-cake5) | 14.3.2 | stable | | ^4.5 | [13.0](https://github.com/cakedc/users/tree/13.next-cake4) | 13.0.1 | stable | | ^5.0 | [12.0](https://github.com/cakedc/users/tree/12.next-cake5) | 12.0 | beta | | ^4.3 | [11.0](https://github.com/cakedc/users/tree/11.next-cake4) | 11.1.0 | stable | From 5ec8ae8918eed8ad74643fb332a8b8e3aebe7b00 Mon Sep 17 00:00:00 2001 From: Alejandro Ibarra Date: Fri, 17 Jan 2025 06:58:14 +0100 Subject: [PATCH 26/29] Fix plugin loaded twice in tests/bootstrap.php --- tests/bootstrap.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 2d7e543cb..183335a2f 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -136,7 +136,6 @@ class_alias('TestApp\Controller\AppController', 'App\Controller\AppController'); ]); \Cake\Utility\Security::setSalt('yoyz186elmi66ab9pz4imbb3tgy9vnsgsfgwe2r8tyxbbfdygu9e09tlxyg8p7dq'); -Plugin::getCollection()->add(new \CakeDC\Users\Plugin()); session_id('cli'); \Cake\Core\Configure::write('Users.AllowedRedirectHosts', [ From a464935a1b30dc59221a52bac30a6f021c19fdf9 Mon Sep 17 00:00:00 2001 From: Alejandro Ibarra Date: Fri, 17 Jan 2025 10:48:55 +0100 Subject: [PATCH 27/29] Make plugin compatible with CakePHP 5.1 --- src/Model/Behavior/SocialAccountBehavior.php | 12 +++++++----- .../Traits/Integration/LoginTraitIntegrationTest.php | 12 ++++++------ .../Integration/RegisterTraitIntegrationTest.php | 4 ++-- .../Integration/SimpleCrudTraitIntegrationTest.php | 12 ++++++------ tests/bootstrap.php | 4 ++-- 5 files changed, 23 insertions(+), 21 deletions(-) diff --git a/src/Model/Behavior/SocialAccountBehavior.php b/src/Model/Behavior/SocialAccountBehavior.php index a0a84650d..f1bfd4cfc 100644 --- a/src/Model/Behavior/SocialAccountBehavior.php +++ b/src/Model/Behavior/SocialAccountBehavior.php @@ -38,11 +38,13 @@ class SocialAccountBehavior extends Behavior public function initialize(array $config): void { parent::initialize($config); - $this->_table - ->belongsTo('Users') - ->setForeignKey('user_id') - ->setJoinType('INNER') - ->setClassName(Configure::read('Users.table')); + if (!$this->_table->hasAssociation('Users')) { + $this->_table + ->belongsTo('Users') + ->setForeignKey('user_id') + ->setJoinType('INNER') + ->setClassName(Configure::read('Users.table')); + } } /** diff --git a/tests/TestCase/Controller/Traits/Integration/LoginTraitIntegrationTest.php b/tests/TestCase/Controller/Traits/Integration/LoginTraitIntegrationTest.php index ad20dbaeb..9ac153007 100644 --- a/tests/TestCase/Controller/Traits/Integration/LoginTraitIntegrationTest.php +++ b/tests/TestCase/Controller/Traits/Integration/LoginTraitIntegrationTest.php @@ -88,8 +88,8 @@ public function testLoginGetRequestNoSocialLogin() $this->assertResponseNotContains('Username or password is incorrect'); $this->assertResponseContains(''); $this->assertResponseContains('Please enter your username and password'); - $this->assertResponseContains('assertResponseContains('assertResponseContains('assertResponseContains('assertResponseContains('assertResponseContains(''); $this->assertResponseContains('Register'); @@ -114,8 +114,8 @@ public function testLoginGetRequest() $this->assertResponseNotContains('Username or password is incorrect'); $this->assertResponseContains(''); $this->assertResponseContains('Please enter your username and password'); - $this->assertResponseContains('assertResponseContains('assertResponseContains('assertResponseContains('assertResponseContains('assertResponseContains(''); $this->assertResponseContains('Register'); @@ -143,8 +143,8 @@ public function testLoginPostRequestInvalidPassword() $this->assertResponseContains('Username or password is incorrect'); $this->assertResponseContains(''); $this->assertResponseContains('Please enter your username and password'); - $this->assertResponseContains('assertResponseContains('assertResponseContains('assertResponseContains('assertResponseContains('assertResponseContains(''); } diff --git a/tests/TestCase/Controller/Traits/Integration/RegisterTraitIntegrationTest.php b/tests/TestCase/Controller/Traits/Integration/RegisterTraitIntegrationTest.php index 5e27ef5ea..82c93849a 100644 --- a/tests/TestCase/Controller/Traits/Integration/RegisterTraitIntegrationTest.php +++ b/tests/TestCase/Controller/Traits/Integration/RegisterTraitIntegrationTest.php @@ -48,7 +48,7 @@ public function testRegister() $this->assertResponseContains('assertResponseContains('assertResponseContains('assertResponseContains(''); + $this->assertResponseContains(''); $this->assertResponseContains(''); } @@ -83,7 +83,7 @@ public function testRegisterPostWithErrors() $this->assertResponseContains('assertResponseContains('assertResponseContains('assertResponseContains(''); + $this->assertResponseContains(''); $this->assertResponseContains(''); } diff --git a/tests/TestCase/Controller/Traits/Integration/SimpleCrudTraitIntegrationTest.php b/tests/TestCase/Controller/Traits/Integration/SimpleCrudTraitIntegrationTest.php index 9a35d74b3..71c3cdeb1 100644 --- a/tests/TestCase/Controller/Traits/Integration/SimpleCrudTraitIntegrationTest.php +++ b/tests/TestCase/Controller/Traits/Integration/SimpleCrudTraitIntegrationTest.php @@ -59,7 +59,7 @@ public function testCrud() $this->assertResponseContains('View'); $this->assertResponseContains('Change password'); $this->assertResponseContains('Edit'); - $this->assertResponseContains('style="display:none;" method="post" action="/users/delete/00000000-0000-0000-0000-000000000001"'); + $this->assertResponseContains('method="post" style="display:none;" action="/users/delete/00000000-0000-0000-0000-000000000001"'); $this->assertResponseContains('>Delete<'); $this->assertResponseContains('user-6'); @@ -69,7 +69,7 @@ public function testCrud() $this->assertResponseContains('View'); $this->assertResponseContains('Change password'); $this->assertResponseContains('Edit'); - $this->assertResponseContains('style="display:none;" method="post" action="/users/delete/00000000-0000-0000-0000-000000000006"'); + $this->assertResponseContains('method="post" style="display:none;" action="/users/delete/00000000-0000-0000-0000-000000000006"'); $this->get('/users/change-password/00000000-0000-0000-0000-000000000006'); $this->assertFlashMessage('Changing another user\'s password is not allowed'); @@ -95,13 +95,13 @@ public function testCrud() $this->get('/users/edit/00000000-0000-0000-0000-000000000006'); $this->assertResponseContains('assertResponseContains('id="username" value="user-6"'); $this->assertResponseContains('assertResponseContains('id="email" value="6@example.com"'); $this->assertResponseContains('Active'); - $this->assertResponseContains('style="display:none;" method="post" action="/users/delete/00000000-0000-0000-0000-000000000006"'); + $this->assertResponseContains('method="post" style="display:none;" action="/users/delete/00000000-0000-0000-0000-000000000006"'); $this->assertResponseContains('List Users'); $this->enableSecurityToken(); @@ -124,7 +124,7 @@ public function testCrud() $this->assertResponseContains('Edit User'); $this->assertResponseContains('New User'); $this->assertResponseContains('List Users'); - $this->assertResponseContains('style="display:none;" method="post" action="/users/delete/00000000-0000-0000-0000-000000000006"'); + $this->assertResponseContains('method="post" style="display:none;" action="/users/delete/00000000-0000-0000-0000-000000000006"'); $this->post('/users/delete/00000000-0000-0000-0000-000000000006'); $this->assertRedirect('/users/index'); diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 183335a2f..1466db70c 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -95,11 +95,13 @@ Cake\Core\Configure::write('Session', [ 'defaults' => 'php', ]); +session_id('cli'); Plugin::getCollection()->add(new \CakeDC\Users\Plugin([ 'path' => dirname(dirname(__FILE__)) . DS, 'routes' => true, ])); + if (file_exists($root . '/config/bootstrap.php')) { require $root . '/config/bootstrap.php'; } @@ -136,8 +138,6 @@ class_alias('TestApp\Controller\AppController', 'App\Controller\AppController'); ]); \Cake\Utility\Security::setSalt('yoyz186elmi66ab9pz4imbb3tgy9vnsgsfgwe2r8tyxbbfdygu9e09tlxyg8p7dq'); -session_id('cli'); - \Cake\Core\Configure::write('Users.AllowedRedirectHosts', [ 'localhost', 'example.com', From 2ad0b30483768b8827c71858fe502f343158b072 Mon Sep 17 00:00:00 2001 From: Alejandro Ibarra Date: Fri, 17 Jan 2025 12:25:30 +0100 Subject: [PATCH 28/29] Update version and changelog --- .semver | 2 +- CHANGELOG.md | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.semver b/.semver index 71dd10761..d96f7041f 100644 --- a/.semver +++ b/.semver @@ -1,5 +1,5 @@ --- :major: 14 :minor: 3 -:patch: 2 +:patch: 3 :special: '' diff --git a/CHANGELOG.md b/CHANGELOG.md index 99ba55c20..54eb1d251 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,10 @@ Changelog ========= Releases for CakePHP 5 ------------- +* 14.3.3 + * Add compatibility with CakePHP 5.1 * 14.3.2 -* Fix missing spanish translations + * Fix missing spanish translations * 14.3.1 * Fix duplicated rule name in rules checker * 14.3.0 @@ -13,7 +15,7 @@ Releases for CakePHP 5 * #1096: fixed findExistingForSocialLogin finder by @arusinowski in #1097 * 14.2.1 * Improve documentation about password meter. - * Fix minor bugs + * Fix minor bugs * 14.2.0 * Add password meter to display password quality * Add integration with google reCaptcha v3, keep default using v2 From 8442217ed90490ea02792b10269fcc614bbebcd9 Mon Sep 17 00:00:00 2001 From: Alejandro Ibarra Date: Fri, 17 Jan 2025 06:53:16 +0100 Subject: [PATCH 29/29] 1108 - Fix usage of `superadmin` and `admin` across the plugin --- .semver | 2 +- CHANGELOG.md | 3 +++ config/permissions.php | 2 +- src/Command/UsersAddSuperuserCommand.php | 3 ++- tests/Fixture/UsersFixture.php | 11 ++++++----- .../TestCase/Command/UsersAddSuperuserCommandTest.php | 3 ++- tests/TestCase/Command/UsersChangeRoleCommandTest.php | 9 +++++---- 7 files changed, 20 insertions(+), 13 deletions(-) diff --git a/.semver b/.semver index d96f7041f..82dddee59 100644 --- a/.semver +++ b/.semver @@ -1,5 +1,5 @@ --- :major: 14 :minor: 3 -:patch: 3 +:patch: 4 :special: '' diff --git a/CHANGELOG.md b/CHANGELOG.md index 54eb1d251..de7ffae8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ Changelog ========= Releases for CakePHP 5 ------------- +* 14.3.4 + * Replace usage of 'admin' by UsersTable::ROLE_ADMIN constant across the plugin. + * Fix role in UsersAddSuperuserCommand to be 'admin' instead of 'superadmin'. * 14.3.3 * Add compatibility with CakePHP 5.1 * 14.3.2 diff --git a/config/permissions.php b/config/permissions.php index e9cda4dce..a7d884d8d 100644 --- a/config/permissions.php +++ b/config/permissions.php @@ -94,7 +94,7 @@ ], //admin role allowed to all the things [ - 'role' => 'admin', + 'role' => \CakeDC\Users\Model\Table\UsersTable::ROLE_ADMIN, 'prefix' => '*', 'extension' => '*', 'plugin' => '*', diff --git a/src/Command/UsersAddSuperuserCommand.php b/src/Command/UsersAddSuperuserCommand.php index 041f60cad..52dd27081 100644 --- a/src/Command/UsersAddSuperuserCommand.php +++ b/src/Command/UsersAddSuperuserCommand.php @@ -7,6 +7,7 @@ use Cake\Console\Arguments; use Cake\Console\ConsoleIo; use CakeDC\Users\Command\Logic\CreateUserTrait; +use CakeDC\Users\Model\Table\UsersTable; /** * UsersAddSuperuser command. @@ -26,7 +27,7 @@ public function execute(Arguments $args, ConsoleIo $io) { $this->_createUser($args, $io, [ 'username' => 'superadmin', - 'role' => 'superuser', + 'role' => UsersTable::ROLE_ADMIN, 'is_superuser' => true, ]); } diff --git a/tests/Fixture/UsersFixture.php b/tests/Fixture/UsersFixture.php index 6c0630138..e9f828f70 100644 --- a/tests/Fixture/UsersFixture.php +++ b/tests/Fixture/UsersFixture.php @@ -13,6 +13,7 @@ namespace CakeDC\Users\Test\Fixture; use Cake\TestSuite\Fixture\TestFixture; +use CakeDC\Users\Model\Table\UsersTable; use CakeDC\Users\Webauthn\Base64Utility; /** @@ -44,7 +45,7 @@ public function init(): void 'tos_date' => '2015-06-24 17:33:54', 'active' => false, 'is_superuser' => true, - 'role' => 'admin', + 'role' => UsersTable::ROLE_ADMIN, 'created' => '2015-06-24 17:33:54', 'modified' => '2015-06-24 17:33:54', 'additional_data' => [ @@ -85,7 +86,7 @@ public function init(): void 'tos_date' => '2015-06-24 17:33:54', 'active' => true, 'is_superuser' => true, - 'role' => 'admin', + 'role' => UsersTable::ROLE_ADMIN, 'created' => '2015-06-24 17:33:54', 'modified' => '2015-06-24 17:33:54', 'last_login' => '2015-06-24 17:33:54', @@ -106,7 +107,7 @@ public function init(): void 'is_superuser' => true, 'tos_date' => '2015-06-24 17:33:54', 'active' => false, - 'role' => 'admin', + 'role' => UsersTable::ROLE_ADMIN, 'created' => '2015-06-24 17:33:54', 'modified' => '2015-06-24 17:33:54', ], @@ -146,7 +147,7 @@ public function init(): void 'tos_date' => '2015-06-24 17:33:54', 'active' => true, 'is_superuser' => false, - 'role' => 'user', + 'role' => UsersTable::ROLE_USER, 'created' => '2015-06-24 17:33:54', 'modified' => '2015-06-24 17:33:54', ], @@ -166,7 +167,7 @@ public function init(): void 'tos_date' => '2015-06-24 17:33:54', 'active' => true, 'is_superuser' => false, - 'role' => 'user', + 'role' => UsersTable::ROLE_USER, 'created' => '2015-06-24 17:33:54', 'modified' => '2015-06-24 17:33:54', ], diff --git a/tests/TestCase/Command/UsersAddSuperuserCommandTest.php b/tests/TestCase/Command/UsersAddSuperuserCommandTest.php index 6ef7fc7cb..8becbbed3 100644 --- a/tests/TestCase/Command/UsersAddSuperuserCommandTest.php +++ b/tests/TestCase/Command/UsersAddSuperuserCommandTest.php @@ -6,6 +6,7 @@ use Cake\Console\TestSuite\ConsoleIntegrationTestTrait; use Cake\ORM\TableRegistry; use Cake\TestSuite\TestCase; +use CakeDC\Users\Model\Table\UsersTable; /** * CakeDC\Users\Command\UsersAddSuperuserCommand Test Case @@ -66,7 +67,7 @@ public function testExecuteWithNoParams(): void $this->assertOutputRegExp('/^Superuser added:/'); $this->assertOutputRegExp('/Username: superadmin/'); $this->assertOutputRegExp('/Email: superadmin@example.com/'); - $this->assertOutputRegExp('/Role: superuser/'); + $this->assertOutputRegExp('/Role: ' . UsersTable::ROLE_ADMIN . '/'); $this->assertOutputRegExp('/Password: [a-z0-9]{32}$/'); } } diff --git a/tests/TestCase/Command/UsersChangeRoleCommandTest.php b/tests/TestCase/Command/UsersChangeRoleCommandTest.php index c367c675b..92b98cca9 100644 --- a/tests/TestCase/Command/UsersChangeRoleCommandTest.php +++ b/tests/TestCase/Command/UsersChangeRoleCommandTest.php @@ -6,6 +6,7 @@ use Cake\Console\TestSuite\ConsoleIntegrationTestTrait; use Cake\ORM\TableRegistry; use Cake\TestSuite\TestCase; +use CakeDC\Users\Model\Table\UsersTable; /** * CakeDC\Users\Command\UsersChangeRoleCommand Test Case @@ -37,8 +38,8 @@ public function testExecute(): void $userId006 = '00000000-0000-0000-0000-000000000006'; $roleBefore = 'Lorem ipsum dolor sit amet'; $userId001 = '00000000-0000-0000-0000-000000000001'; - $role001 = 'admin'; - $role006 = 'user'; + $role001 = UsersTable::ROLE_ADMIN; + $role006 = UsersTable::ROLE_USER; $this->assertTrue($UsersTable->exists(['id' => $userIdTarget, 'role' => $roleBefore])); $this->assertTrue($UsersTable->exists(['id' => $userId001, 'role' => $role001])); $this->assertTrue($UsersTable->exists(['id' => $userId006, 'role' => $role006])); @@ -71,8 +72,8 @@ public function testExecuteMissingInfo(string $command, $expectedMessage): void $userId006 = '00000000-0000-0000-0000-000000000006'; $roleBefore = 'Lorem ipsum dolor sit amet'; $userId001 = '00000000-0000-0000-0000-000000000001'; - $role001 = 'admin'; - $role006 = 'user'; + $role001 = UsersTable::ROLE_ADMIN; + $role006 = UsersTable::ROLE_USER; $this->assertTrue($UsersTable->exists(['id' => $userIdTarget, 'role' => $roleBefore])); $this->assertTrue($UsersTable->exists(['id' => $userId001, 'role' => $role001])); $this->assertTrue($UsersTable->exists(['id' => $userId006, 'role' => $role006]));