- Backend: detect the actual filesystem mountpoint via 'df' instead of
hardcoding /srv/samba — setquota needs the mountpoint, not a subpath
- Backend: catch CalledProcessError and FileNotFoundError from setquota
and return the actual error message (e.g. quota not enabled, package
not installed) instead of crashing with 500
- Frontend: always send the share path in the quota API call so the
backend can find the right filesystem, even for SMB per-user quotas
- Frontend: read the actual error message from the response and show it
in the toast instead of just "N quota(s) failed"
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- shares.js, users.js: JSON.stringify() inside onclick="..." attributes
produced unescaped " chars that broke HTML attribute parsing — all
dynamic onclick JSON now passed through esc() so the browser decodes
" back to " before executing the handler
- Replace browser confirm() dialogs with a styled Bootstrap modal
(#deleteModal) for share and user deletion — reusable across all tabs
- users.js: rename shadow variable 'confirm' → 'pwConfirm' to avoid
shadowing the now-removed confirm() call
- main.js: auto-refresh now reloads shares and users every 30 s,
not just the dashboard
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Backend:
- SMB config parser/writer (_parse_smb_conf, _write_smb_conf) for
safe whole-file rewrites instead of append-only
- NFS exports parser/writer (_parse_exports, _write_exports) with
support for disabled (commented-out) exports
- DELETE/PATCH/toggle endpoints for SMB and NFS shares
- parse_smb() now returns enabled field (reads available = no)
- get_nfs_shares() uses the new parser and returns enabled field
- Replace HTTP Basic Auth with Flask session auth (secret key derived
from MICRONAS_PASS so sessions survive restarts)
- /login GET/POST, /logout routes
Frontend:
- Login page (templates/login.html) with same dark theme
- Sign out button in header
- Edit modal pre-filled with current share values
- Delete buttons wired up (with confirm dialog)
- Enable/Disable toggle per share (green/grey dot status indicator)
- Disabled shares shown at reduced opacity
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>