Commit Graph
4 Commits
Author SHA1 Message Date
marcandClaude Sonnet 4.6 596365b805 Add group management and owner/group dropdowns in permission editor
Backend:
- _list_groups(): reads /etc/group, returns groups with gid >= 1000
  plus a small whitelist (root, staff, sambashare, www-data)
- GET/POST /api/groups: list and create groups (groupadd)
- DELETE /api/groups/<name>: delete group (groupdel)
- POST /api/groups/<name>/members: add user to group (gpasswd -a)
- DELETE /api/groups/<name>/members/<user>: remove user (gpasswd -d)

Frontend:
- Users tab now has a Groups section: table with GID, member badges
  with × remove buttons, per-row "add member" select populated with
  users not already in the group, delete group button
- loadUsers() caches result in _cachedUsers for groups table to use
- openEditModal is now async; fetches /api/users + /api/groups before
  rendering so Owner and Group inputs have datalist autocomplete

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 00:47:43 +02:00
marcandClaude Sonnet 4.6 f4943b6b6d Add refresh countdown, fix quota fs lookup, update README
- main.js: show live countdown "Updated HH:MM:SS — next in Xs" so the
  30s auto-refresh is visually obvious instead of just a static timestamp
- app.py: rename _find_mountpoint → _find_quota_fs and fix the stale
  call site that caused a NameError; function now returns mountpoint from
  df, falling back to the path itself if df returns /
- README: add full quota setup section (fstab usrquota, quotacheck,
  quotaon, verify with repquota); fix stale "127.0.0.1" bind note
  (service already uses 0.0.0.0); update Auth section (sessions, not
  Basic Auth)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 22:38:42 +02:00
marcandClaude Sonnet 4.6 74737568b0 Fix broken action buttons and add delete confirmation modal
- 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
  &quot; 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>
2026-06-19 22:33:37 +02:00
marcandClaude Sonnet 4.6 1118681fd2 Restructure frontend into templates/ and static/
- Move index.html → templates/index.html (Jinja2, uses url_for)
- Extract CSS → static/css/app.css
- Split JS into static/js/: utils.js, dashboard.js, shares.js,
  quotas.js, users.js, main.js
- Switch app.py from send_file to render_template

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 22:19:46 +02:00