v2.6.1c (Lyra): Admin gebruikersbeheer opnieuw ontworpen + CLI reset

Nieuwe features:
- Admin gebruikerslijst met zoeken/filter op gebruikersnaam en rol
- Profiel bewerken pagina met wachtwoord wijzigen en rol wijzigen
- Nieuwe gebruiker aanmaken via aparte pagina
- CLI commando cli/reset-admin-password.php voor admin wachtword reset + lockout reset

Architectuur:
- /admin/users: lijst met zoekveld, rol filter, bewerk/verwijder acties
- /admin/users-edit?user=<naam>: profiel, wachtwoord, rol, verwijderen
- /admin/users-new: nieuwe gebruiker aanmaken
- AdminAuth::clearLockout() public methode voor CLI gebruik

Documentatie:
- guide/nl/en/admin-beheerder/gebruikers.md herschreven
- 15 nieuwe admin vertaalkeys in NL/EN/DE
- Release notes: docs/release-notes/v2.6.1c.md

Tests:
- Pentest: 30/30 geslaagd, 0 vulnerabilities
- WCAG 2.1 AA: 25/25 geslaagd, 100% compliance
This commit is contained in:
root
2026-08-17 15:10:40 +00:00
parent c2cf08955b
commit 88fbaa5702
14 changed files with 767 additions and 220 deletions
+52 -12
View File
@@ -15,23 +15,63 @@ CodePress has four roles, defined in `AdminAuth::ROLE_PERMISSIONS`:
Roles are displayed with their label via `AdminAuth::ROLE_LABELS`.
## Adding a user
## Users list (`/admin/users`)
1. Go to **Users**
2. Enter username
3. Choose password (stored as bcrypt hash)
4. Select a role
5. Click **Add**
The users list shows all users with their username, role, login email and creation date.
## Editing a user
### Search and filter
- Change password (new bcrypt hash)
- Change role (immediately affects visible routes and sidebar items)
- **Search field**: search by username, email or author name
- **Role filter**: filter by a specific role via the dropdown
- Click **Filter** to apply the results
## Deleting a user
### Adding a new user
- Not possible for own account
- Confirm with password
1. Click **New user** (top right of the list)
2. Enter username, password (minimum 8 characters), email, author name and author email
3. Select a role
4. Click **Add user**
5. You will be automatically redirected to the profile page of the new user
## Editing a profile (`/admin/users-edit?user=<name>`)
Click on a user in the list to edit their profile. The profile page contains three sections:
### Profile information
- Login email, author name and author email can be changed
- The username cannot be changed
### Change password
- Enter a new password (minimum 8 characters)
- Confirm the password
- The password is stored as a bcrypt hash
### Change role
- Shows the current role with a colored badge
- Select a new role from the dropdown
- The change immediately affects the visible admin routes and sidebar items
### Delete user (Danger zone)
- Only visible for other users (not for your own account)
- Confirmation via JavaScript dialog
- After deletion you return to the users list
## Admin password reset via CLI
If the admin is locked out (e.g. due to brute-force lockout or forgotten password), the password can be reset via the CLI:
```bash
# Reset with a specific password
php cli/reset-admin-password.php admin NewPassword123
# Reset with an automatically generated password
php cli/reset-admin-password.php admin
```
The command:
- Changes the password (as a bcrypt hash)
- Clears the brute-force lockout for the user
- Displays the new password in the terminal
## Access control