70c2fe1210
- Allowlist entries take "user": <username> — sessions started with that card attribute to the person, and the owner sees their card's history even without gun-wide permissions (ownership looked up live) - "guns": ["eu092025:2"] (fnmatch) replaces the charger-blind "connectors": [2] restriction — safe with multiple chargers - New "chargers" config section provides per-charger/per-gun display names; the panel no longer hardcodes the Anfu gun labels - Panel admin tab: owner dropdown + guns field on card entries - Smoke test: 42 checks, incl. retroactive history visibility after linking a card and rejection of links to unknown users
52 lines
1.4 KiB
JSON
52 lines
1.4 KiB
JSON
{
|
|
"learn_mode": true,
|
|
"session_secret": "<auto-generated on first run — signs login sessions>",
|
|
"users": {
|
|
"admin-user": {
|
|
"password": "<pbkdf2 hash — create users with: python -m backend.users add <name>>",
|
|
"scopes": ["admin"],
|
|
"id_tag": "app-admin-user"
|
|
},
|
|
"gun1-only-user": {
|
|
"password": "<pbkdf2 hash>",
|
|
"scopes": ["charger:eu092025:1", "relay:garden-lights"],
|
|
"id_tag": "app-gun1-only-user"
|
|
},
|
|
"relays-only-user": {
|
|
"password": "<pbkdf2 hash>",
|
|
"scopes": ["relay:*"],
|
|
"id_tag": "app-relays-only-user"
|
|
}
|
|
},
|
|
"authorized": {
|
|
"1000000000000000": {
|
|
"name": "Card linked to a user, works everywhere",
|
|
"kind": "card",
|
|
"user": "admin-user"
|
|
},
|
|
"1000000000000001": {
|
|
"name": "Card restricted to gun 2 of one charger",
|
|
"kind": "card",
|
|
"user": "gun1-only-user",
|
|
"guns": ["eu092025:2"]
|
|
},
|
|
"app-remote": { "name": "Web/app remote start token", "kind": "app" }
|
|
},
|
|
"chargers": {
|
|
"eu092025": {
|
|
"label": "Anfu 60kW",
|
|
"guns": { "1": "Gun 1 · EU (CCS)", "2": "Gun 2 · GB/T" }
|
|
}
|
|
},
|
|
"relays": {
|
|
"example-relay": {
|
|
"id": "<tuya device id from tinytuya wizard>",
|
|
"key": "<tuya local key from tinytuya wizard>",
|
|
"ip": "auto",
|
|
"version": 3.3,
|
|
"switch": 1,
|
|
"label": "Garden lights"
|
|
}
|
|
}
|
|
}
|