# RAMA AG — Employee Onboarding Report

Status: **LIVE since 27.11.2026 ≈08:43 — `rama-v1.0.0-rc3` (`9ccca13`) on `http://localhost:3400`.**
Source: the owner's SMGV PDF `smgv-zeitkontrolle-alle-2026.pdf` (SHA-256 `60b47575…dc678e15`, 140 pages). Authorised by the owner's "REAL EMPLOYEE ONBOARDING & SMGV HISTORICAL DATA IMPORT" message.

## 1. Accounts registered

All 10 employees in the PDF were registered. Each one has the role **Punëtor (worker)**, a username, **no e-mail address** (none was invented) and a hashed temporary password.

| Employee | Username | Employment (PDF) | Account status |
| --- | --- | --- | --- |
| Avni Hoti | `avni.hoti` | 01.01.2026 – 31.08.2026 | active since 27.11.2026 09:08 (see §1a) |
| Johan Manuel Batista de Mota | `johan.batistademota` | 01.02.2026 – 31.08.2026 | active (see §1a) |
| Durim Buduri | `durim.buduri` | — – 30.09.2026 | active (see §1a) |
| Besart Dibra | `besart.dibra` | — – 31.08.2026 | active (see §1a) |
| Blerim Dullovi | `blerim.dullovi` | 01.04.2026 – 31.08.2026 | active (see §1a) |
| Zekri Elmazi | `zekri.elmazi` | 01.03.2026 – 31.08.2026 | active (see §1a) |
| Shipran Kryezi | `shipran.kryezi` | — – 31.08.2026 | active (see §1a) |
| Flurim Kurtaj | `flurim.kurtaj` | 01.03.2026 – 31.08.2026 | active (see §1a) |
| Egzon Tahiri | `egzon.tahiri` | — – 31.08.2026 | active (see §1a) |
| Memet Tairi | `memet.tairi` | 01.02.2026 – 31.08.2026 | active (see §1a) |

**At import time:** every *Austrittsdatum* in the PDF (31.08.2026, or 30.09.2026 for Durim Buduri) is before today (27.11.2026). As the spec requires ("do not automatically enable access for former employees"), all 10 accounts were therefore created **deactivated** and cannot sign in. When an employee is still or again employed, the Administrator re-activates the account in *SMGV → Fleta bazë → Hyrja & Siguria → Aktivizo llogarinë*. The temporary password still applies and must be changed at the first sign-in.

### 1a. Activation (owner decision, 27.11.2026 09:08)

The owner first chose "Aktivizoji të gjithë" on the decision card, then confirmed it directly: *"aktivizoji 10 punëtorët tani dhe hiq datën e largimit nga kontrata"* ("activate the 10 workers now and remove the leaving date from the contract").

**Before the change**, a protected backup was taken: `backups\activation-predeploy-20261127-085653` (owner + SYSTEM only). It was verified twice:
- SHA256SUMS: 0 mismatches.
- A full restore into the test DB: 50/50 tables, 0 checksum mismatches, 32/32 triggers. The test DB was wiped afterwards.

**What changed.** The change went through the application's own admin services (`SmgvEmployees::saveContract`, `EmployeeAccess::setActive`), with the Administrator as actor (20 audit entries):
- all 10 accounts are **active**;
- the end date of each one's current contract is **removed** (10 open contracts).

**What did not change.** Verified by table checksums before and after:
- historical values and their provenance;
- absences, opening balances, Pensum periods, holidays and profiles;
- the import batch, corrections, and attendance;
- all user credentials, usernames, e-mails and roles;
- the other contract fields.

The **original PDF leaving dates remain stored as source values** (10 × `exit_date` in `smgv_historical_values`). Temporary passwords and `must_change_password = true` are unchanged.

**Verification (read-only, without signing in as an employee, so no false "last login" is recorded):**
- the account is active and the username resolves at login;
- the temporary password matches the stored hash;
- `must_change_password` is set, so the first sign-in goes to the change-password page (the redirect itself is covered by the automated tests and the `:3401` browser rehearsal);
- the Administrator fingerprint is unchanged;
- `/health` and `/login` respond 200.

**Open point, the Pensum after the old leaving date.** The Basisblatt Pensum in the PDF ends with the old leaving date (31.08.2026, Durim Buduri 30.09.2026). Without a new Pensum, September–December show 0 Sollstunden. No percentage was invented. The owner must set the current Pensum (Fleta bazë → Pensum, from 01.09.2026, or 01.10.2026 for Durim Buduri); per the PDF it was 100 %, and 70 % for Zekri Elmazi.

The existing Administrator account was **not changed**. Its fingerprint of e-mail, password hash, role, status and username is identical before and after the deployment.

## 2. Names and usernames

- **Name order.** The SMGV workbook prints names *surname first* ("Dibra Besart"). One sheet is typed *given name first* ("Avni Hoti"), and one name has a three-word surname ("Batista de Mota Johan Manuel"). The order cannot be derived reliably from the text, so it is an explicit per-employee decision of the import (selectable on the import screen). The decisions used:
  - default: surname first;
  - "Avni Hoti": given name first;
  - "Batista de Mota Johan Manuel": the first three words are the surname.

  These match the owner's examples (`avni.hoti`, `besart.dibra`, `memet.tairi`).
- **Username rule.** `firstname.lastname`, lowercase ASCII:
  - ë→e, ç→c, ä→ae, ö→oe, ü→ue, ß→ss, any other letter → its ASCII form;
  - spaces, hyphens and apostrophes inside a name part are removed;
  - only the first given name is used ("Johan Manuel" → `johan`);
  - duplicates get a numeric suffix (`name.surname2`).

  The Administrator can change any username in *Hyrja & Siguria*.
- **Duplicate detection.** Before creating an account, the import looks for an existing worker with the same name (in either order) and a matching birth date. It reuses that account and never creates a second one. Result: 0 existing matches, 10 new accounts, 0 duplicates. Re-running the import is refused, so no second account can appear.

## 3. Authentication changes

| Item | Implementation |
| --- | --- |
| Username login | Users without e-mail sign in with their username; the Administrator can still use e-mail. Labels: SQ **"Emri i përdoruesit"**, DE **"Benutzername"**; placeholder `emri.mbiemri` / `vorname.nachname` |
| Initial passwords | `firstname123` (e.g. "avni" + "123"), stored **only** as a bcrypt hash (all 11 accounts verified bcrypt). Never in the DB in clear text, never in logs, the audit log, Git or the reports |
| First sign-in | The login redirects to *Zgjidhni një fjalëkalim të ri*. `EnsurePasswordIsChanged` (previously a no-op) now blocks every page and every Livewire update until a permanent password is set (HTTP: redirect; JSON/Livewire: 403). The page uses the Black Titanium design, with show/hide toggles on all three fields |
| Permanent passwords | Employees: ≥ 8 characters, no composition rules. Administrators: ≥ 12. Refused for both: common passwords, keyboard/number runs, one repeated character, the account name, and the onboarding pattern "name123" |
| Existing safety | Login throttling (per account and per IP), CSRF, timing-safe failure and session rules are unchanged. The throttle key works for accounts without e-mail |
| Removed | The login no longer clears `must_change_password` |

## 4. "Login & Security" section (Hyrja & Siguria / Anmeldung & Sicherheit)

This section is on every employee profile (*SMGV → Fleta bazë*). It is for the **Administrator only**: the component and the `EmployeeAccess` service re-check the role on every action, and administrator accounts cannot be managed here.

- Username (change; the employee's sessions end).
- Account status (active / deactivated) with **Activate** / **Deactivate** (deactivate ends the sessions).
- **Set temporary password**: at least 6 characters, with a show/hide toggle and an optional **generator** (12 characters, no look-alikes). It forces a change at the next sign-in and ends the sessions.
- **Reset password**: a new random temporary password is shown **once** to the Administrator and is never stored in clear text.
- **Require password change** / waive it.
- Last successful login, password last changed, number of active sessions, **Revoke sessions**.
- Stored passwords are never displayed. Every action is audited without any password value.

## 5. Initial credentials (protected hand-over)

The initial credential list was written to **one local file outside the project**, readable only by the owner account and SYSTEM:

`D:\- CLAUD PROJECTS\RAMA AG\onboarding-credentials\RAMA_AG_initial_employee_credentials.txt`

It contains each username, its temporary password and the account status. It is not in any report, log or repository. Recommended: delete the file once the employees who are re-activated have signed in. No onboarding e-mails were sent (outbound mail stays blocked).

## 6. Missing fields (not in the PDF, left empty)

- **All 10 employees:** street, postal code / city, telephone, e-mail and AHV number. The PDF shows only the template placeholders ("Strasse Nr", "PLZ Ort", "Telefon", "E-Mail", "AHV-Nummer").
- **Eintrittsdatum missing** for Durim Buduri, Besart Dibra, Shipran Kryezi and Egzon Tahiri. Their contract starts on 01.01.2026 only as the *start of the imported accounting year*. This is noted on the contract, and their sheets start in January.
- **Vorjahr hours saldo not stated:**
  - Johan Manuel Batista de Mota
  - Besart Dibra
  - Blerim Dullovi
  - Zekri Elmazi
  - Shipran Kryezi
  - Flurim Kurtaj
  - Memet Tairi
- **Vorjahr vacation not stated:**
  - Johan Manuel Batista de Mota
  - Shipran Kryezi
  - Flurim Kurtaj
  - Memet Tairi

These "not stated" values are stored as **empty (NULL)**, never as 0.00.

## 7. Tests

- New:
  - `EmployeeLoginSecurityTest` (5)
  - `SmgvHistoricalImportTest` (7; synthetic workbook)
  - `PasswordPolicyTest` (4)
  - extended `SimpleCredentialsTest` and `LoginTest`
- Updated to the new rules: tests that relied on 6-character permanent passwords, or on the old "temporary flag is ignored" behaviour.
- Full runs, 0 failures: main 581, memory 97, upgrade 2, node 6.
- Browser on `:3401` (rehearsal copy):
  - the admin sees the import, overview, annual and directory pages, desktop and mobile;
  - a temporarily re-activated test account signs in with its temporary password and is forced to the change page;
  - the dashboard stays blocked until the change, and the same password is refused;
  - after the change the employee reaches the dashboard;
  - SMGV pages still return 403 to the employee.

  The check for the refusal message did not match its expected text, because the page showed the "same password" message. The screenshot shows the refusal working. The rehearsal database was wiped afterwards.
