Skip to content

Commit e8dbc63

Browse files
Vitexusclaude
andcommitted
chore: bump to 1.2.0, update tests and documentation
Add php-class DEP-8 test verifying MServer.php is installed with the correct class name and UUID. Expand README with package table, fields table, and smart credential prototype section. Update changelog for 1.2.0 release. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 7566132 commit e8dbc63

4 files changed

Lines changed: 60 additions & 14 deletions

File tree

README.md

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,52 @@
66

77
This repository contains the credential prototype for connecting MultiFlexi to Stormware Pohoda mServer API.
88

9-
## Overview
9+
## Packages
1010

11-
This credential prototype defines the configuration fields required to connect to the Pohoda mServer API, including support for a secondary account for year-end (December/January) data entry.
11+
| Package | Contents |
12+
|---|---|
13+
| `multiflexi-mserver` | Credential prototype JSON, SVG logo, `CredentialProtoType\MServer` PHP class |
14+
| `multiflexi-mserver-ui` | `Ui\CredentialType\MServer` PHP class — web form with live connection test |
1215

1316
## Fields
1417

15-
- **POHODA_ICO**: Organization Number for Pohoda (required)
16-
- **POHODA_URL**: URL of the mServer API (required)
17-
- **POHODA_USERNAME**: Username for the mServer API (required)
18-
- **POHODA_PASSWORD**: Password for the mServer API (required)
19-
- **POHODA_SECONDARY_USERNAME**: Secondary account username for writing December data in January (optional)
20-
- **POHODA_SECONDARY_PASSWORD**: Secondary account password for writing December data in January (optional)
18+
| Keyword | Type | Required | Description |
19+
|---|---|---|---|
20+
| `POHODA_ICO` | string | yes | Organization Number (IČO) |
21+
| `POHODA_URL` | string | yes | mServer API base URL, e.g. `http://pohoda:40000` |
22+
| `POHODA_USERNAME` | string | yes | mServer API username |
23+
| `POHODA_PASSWORD` | password | yes | mServer API password |
24+
| `POHODA_SECONDARY_USERNAME` | string | no | Secondary account username for December→January data entry |
25+
| `POHODA_SECONDARY_PASSWORD` | password | no | Secondary account password for December→January data entry |
2126

22-
## Year-End Data Entry Mechanism
27+
## Smart Credential Prototype (UI)
2328

24-
If data for December is being entered in January, the system will use the secondary account credentials (if provided) to write data into the previous year, provided the secondary account has the necessary permissions.
29+
When `multiflexi-mserver-ui` is installed, the credential form performs a live connection test against `{POHODA_URL}/status` using HTTP Basic Auth. On success it displays:
2530

26-
## Usage
31+
- **Company** — company name registered in Pohoda
32+
- **Status** — server state (`idle` / `busy`)
33+
- **Processing** — number of requests currently being processed
34+
- **Server** — mServer self-reported URL
2735

28-
1. Place the `mserver.credprototype.json` file in your MultiFlexi credential prototypes directory.
29-
2. Configure the required fields in the MultiFlexi UI or via configuration management.
30-
3. For organizations that need to write December data in January, provide the secondary account credentials with permissions for the previous year.
36+
Authentication failures and network errors are shown as inline alerts.
3137

38+
## Year-End Data Entry
39+
40+
If data for December is being entered in January, provide the secondary account credentials. That account must have write permissions for the previous fiscal year in Pohoda.
41+
42+
## Installation
43+
44+
```sh
45+
apt install multiflexi-mserver # core fields + JSON prototype
46+
apt install multiflexi-mserver-ui # web form with connection check
47+
```
48+
49+
The postinst script registers the prototype automatically:
50+
51+
```sh
52+
multiflexi-cli credential-prototype:import-json \
53+
--file /usr/lib/multiflexi-mserver/multiflexi/mserver.credprototype.json
54+
```
3255

3356
## License
3457

debian/changelog

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
multiflexi-mserver (1.2.0) unstable; urgency=medium
2+
3+
* feat: add smart credential prototype PHP classes (CredentialProtoType and Ui)
4+
* feat: add multiflexi-mserver-ui package with live mServer /status connection test
5+
* fix: use credential-prototype:import-json in postinst instead of sync
6+
* chore: add composer.json with PSR-4 autoload mapping
7+
8+
-- Vítězslav Dvořák <info@vitexsoftware.cz> Mon, 26 May 2026 12:00:00 +0200
9+
110
multiflexi-mserver (1.1.1) unstable; urgency=medium
211

312
* fix: add php-symfony-polyfill-php80 dependency to fix postinst failure

debian/tests/control

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@
55
#
66
Tests: credential-prototype
77
Restrictions: needs-root
8+
9+
Tests: php-class
10+
Depends: multiflexi-mserver
11+
Restrictions: needs-root

debian/tests/php-class

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
set -e
3+
4+
CRED_CLASS="/usr/share/php/MultiFlexi/CredentialProtoType/MServer.php"
5+
6+
test -f "$CRED_CLASS" || { echo "FAIL: $CRED_CLASS not found"; exit 1; }
7+
grep -q "class MServer" "$CRED_CLASS" || { echo "FAIL: MServer class not found in $CRED_CLASS"; exit 1; }
8+
grep -q "6ba7b814-9dad-11d1-80b4-00c04fd430c8" "$CRED_CLASS" || { echo "FAIL: expected UUID not found in $CRED_CLASS"; exit 1; }
9+
10+
echo "OK: MServer PHP class installed and valid"

0 commit comments

Comments
 (0)