mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-19 07:33:18 +02:00
feat(api-keys): can_manage_maintenance scope for HA-style automations (#1832 follow-up)
Carve MAINTENANCE_CREATE/UPDATE/DELETE out of the admin denylist so HA automations can log "cleaned nozzle" / reset a counter via API key without granting broader printer control. Follows the same shape as can_manage_library and can_manage_inventory: new column, allowlist entry, UI checkbox, wiki row, RBAC test coverage. Distinct backfill: these perms were EXPLICITLY denied for every API key before this change (no existing integration relies on them), so existing rows migrate to FALSE — no silent scope widening on upgrade. New keys default to TRUE, matching the safe-on-by-default pattern. Bundled SpoolBuddy kiosk key gets False explicitly (kiosk doesn't need it).
This commit is contained in:
@@ -1048,6 +1048,7 @@ export interface APIKey {
|
||||
can_read_status: boolean;
|
||||
can_manage_library: boolean;
|
||||
can_manage_inventory: boolean;
|
||||
can_manage_maintenance: boolean;
|
||||
can_access_cloud: boolean;
|
||||
can_update_energy_cost: boolean;
|
||||
printer_ids: number[] | null;
|
||||
@@ -1064,6 +1065,7 @@ export interface APIKeyCreate {
|
||||
can_read_status?: boolean;
|
||||
can_manage_library?: boolean;
|
||||
can_manage_inventory?: boolean;
|
||||
can_manage_maintenance?: boolean;
|
||||
can_access_cloud?: boolean;
|
||||
can_update_energy_cost?: boolean;
|
||||
printer_ids?: number[] | null;
|
||||
@@ -1081,6 +1083,7 @@ export interface APIKeyUpdate {
|
||||
can_read_status?: boolean;
|
||||
can_manage_library?: boolean;
|
||||
can_manage_inventory?: boolean;
|
||||
can_manage_maintenance?: boolean;
|
||||
can_access_cloud?: boolean;
|
||||
can_update_energy_cost?: boolean;
|
||||
printer_ids?: number[] | null;
|
||||
|
||||
Reference in New Issue
Block a user