Skip to content

Commit 062d66b

Browse files
authored
Merge pull request #684 from codeigniter4/develop
1.0.0-beta.5 Ready code
2 parents 7cb1e49 + 6413513 commit 062d66b

File tree

23 files changed

+299
-36
lines changed

23 files changed

+299
-36
lines changed

.github/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ changelog:
1515
- title: Enhancements
1616
labels:
1717
- enhancement
18+
- title: Translations
19+
labels:
20+
- lang
1821
- title: Refactoring
1922
labels:
2023
- refactor

.github/workflows/docs.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
name: docs
1+
name: docs
22
on:
33
push:
44
branches:
55
- master
6+
permissions:
7+
contents: write
68
jobs:
79
deploy:
810
runs-on: ubuntu-latest
@@ -11,5 +13,5 @@ jobs:
1113
- uses: actions/setup-python@v4
1214
with:
1315
python-version: 3.x
14-
- run: pip install mkdocs-material
16+
- run: pip install mkdocs-material
1517
- run: mkdocs gh-deploy --force

docs/forcing_password_reset.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Depending on the scope of your application, there may be times when you'll decid
66
- [Available Methods](#available-methods)
77
- [Check if a User Requires Password Reset](#check-if-a-user-requires-password-reset)
88
- [Force Password Reset On a User](#force-password-reset-on-a-user)
9-
- [Removing Password Reset Flag On a User](#removing-password-reset-flag-on-a-user)
9+
- [Remove Force Password Reset Flag On a User](#remove-force-password-reset-flag-on-a-user)
1010
- [Force Password Reset On Multiple Users](#force-password-reset-on-multiple-users)
1111
- [Force Password Reset On All Users](#force-password-reset-on-all-users)
1212

@@ -46,9 +46,8 @@ If you see the need to force password reset for more than one user, the `forceMu
4646

4747
```php
4848
use CodeIgniter\Shield\Models\UserIdentityModel;
49-
...
50-
...
51-
...
49+
50+
// ...
5251
$identities = new UserIdentityModel();
5352
$identities->forceMultiplePasswordReset([1,2,3,4]);
5453
```
@@ -59,9 +58,8 @@ If you suspect a security breach or compromise in the passwords of your users, y
5958

6059
```php
6160
use CodeIgniter\Shield\Models\UserIdentityModel;
62-
...
63-
...
64-
...
61+
62+
// ...
6563
$identities = new UserIdentityModel();
6664
$identities->forceGlobalPasswordReset();
6765
```

docs/guides/strengthen_password.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ and `$hashThreads`.
9494
If you use `PASSWORD_ARGON2ID`, you should use PHP's constants:
9595

9696
```php
97-
public int $hashMemoryCost = PASSWORD_ARGON2_DEFAULT_MEMORY_COST;
97+
public int $hashMemoryCost = PASSWORD_ARGON2_DEFAULT_MEMORY_COST;
9898

99-
public int $hashTimeCost = PASSWORD_ARGON2_DEFAULT_TIME_COST;
100-
public int $hashThreads = PASSWORD_ARGON2_DEFAULT_THREADS;
99+
public int $hashTimeCost = PASSWORD_ARGON2_DEFAULT_TIME_COST;
100+
public int $hashThreads = PASSWORD_ARGON2_DEFAULT_THREADS;
101101
```
102102

103103
## Maximum Password Length

docs/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
* [Authentication](authentication.md)
77
* [Authorization](authorization.md)
88
* [Auth Actions](auth_actions.md)
9-
* [Forcing Password Reset](forcing_password_reset.md)
109
* [Events](events.md)
1110
* [Testing](testing.md)
1211
* [Customization](customization.md)
12+
* [Forcing Password Reset](forcing_password_reset.md)
13+
* [Banning Users](banning_users.md)
1314

1415
## Guides
1516
* [Protecting an API with Access Tokens](guides/api_tokens.md)

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ nav:
4747
- Events: events.md
4848
- Testing: testing.md
4949
- Customization: customization.md
50+
- Forcing Password Reset: forcing_password_reset.md
51+
- Banning Users: banning_users.md
5052
- session_auth_event_and_logging.md
5153
- Guides:
5254
- guides/api_tokens.md

src/Auth.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
*/
2626
class Auth
2727
{
28+
/**
29+
* The current version of CodeIgniter Shield
30+
*/
31+
public const SHIELD_VERSION = '1.0.0-beta.5';
32+
2833
protected Authentication $authenticate;
2934

3035
/**

src/Collectors/Auth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function __construct()
5656
*/
5757
public function getTitleDetails(): string
5858
{
59-
return get_class($this->auth->getAuthenticator());
59+
return ShieldAuth::SHIELD_VERSION . ' | ' . get_class($this->auth->getAuthenticator());
6060
}
6161

6262
/**

src/Commands/Generators/Views/usermodel.tpl.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ class {class} extends ShieldUserModel
1010
{
1111
protected function initialize(): void
1212
{
13+
parent::initialize();
14+
1315
$this->allowedFields = [
1416
...$this->allowedFields,
1517

src/Language/de/Auth.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
'unknownAuthenticator' => '{0} ist kein gültiger Authentifikator.',
88
'unknownUserProvider' => 'Der zu verwendende User Provider konnte nicht ermittelt werden.',
99
'invalidUser' => 'Der angegebene Benutzer kann nicht gefunden werden.',
10-
'bannedUser' => '(To be translated) Can not log you in as you are currently banned.',
11-
'logOutBannedUser' => '(To be translated) You have been logged out because you have been banned.',
10+
'bannedUser' => 'Anmelden nicht möglich da Ihr Benutzer derzeit gesperrt ist.',
11+
'logOutBannedUser' => 'Ihr Benutzer wurde abgemeldet und gesperrt.',
1212
'badAttempt' => 'Sie konnten nicht angemeldet werden. Bitte überprüfen Sie Ihre Anmeldedaten.',
1313
'noPassword' => 'Kann einen Benutzer ohne Passwort nicht validieren.',
1414
'invalidPassword' => 'Sie können nicht angemeldet werden. Bitte überprüfen Sie Ihr Passwort.',
@@ -61,7 +61,7 @@
6161
'errorPasswordPwned' => 'Das Passwort {0} wurde aufgrund einer Datenschutzverletzung aufgedeckt und wurde {1, number} Mal in {2} kompromittierten Passwörtern gesehen.',
6262
'suggestPasswordPwned' => '{0} sollte niemals als Passwort verwendet werden. Wenn Sie es irgendwo verwenden, ändern Sie es sofort.',
6363
'errorPasswordEmpty' => 'Ein Passwort ist erforderlich.',
64-
'errorPasswordTooLongBytes' => '(To be translated) Password cannot exceed {param} bytes in length.',
64+
'errorPasswordTooLongBytes' => 'Das Passwort darf die Länge von {param} Bytes nicht überschreiten.',
6565
'passwordChangeSuccess' => 'Passwort erfolgreich geändert',
6666
'userDoesNotExist' => 'Passwort wurde nicht geändert. Der Benutzer existiert nicht',
6767
'resetTokenExpired' => 'Tut mir leid. Ihr Reset-Token ist abgelaufen.',

0 commit comments

Comments
 (0)