Skip to content

v1.3.0

Choose a tag to compare

@github-actions github-actions released this 24 Apr 10:31
· 444 commits to main since this release
Immutable release. Only release title and notes can be modified.
v1.3.0
fa34dac

ldap-manager grows up. This release is the full three-phase UI revamp — a new foundation (Pico CSS + htmx + Alpine in its CSP build), a new information architecture around a command palette and a side drawer, and all the power-browsing + bulk-action work that actually makes the tool useful for day-to-day admin. Backend, URLs, LDAP contract: unchanged. Everything visible to the operator: new.

What's new

New shell and layout. The Tailwind/PostCSS/bun toolchain is gone; every style now comes from a single hand-written app.css on top of Pico CSS v2. Pages use a three-pane layout on wide viewports (OU rail · list · detail drawer) that collapses into a single-pane disclosure on narrow. Topnav stays pinned under flex pressure — long lists no longer squash the header padding. F5 on a fragment URL (e.g. /users/<dn>?fragment=drawer) produces a scrollable full-page detail instead of a bare fragment. AAA contrast is mechanically verified at every theme/density permutation by a token-scanning test so the palette can't drift below 7:1.

Command palette. ⌘K / / opens a search over every loaded user, group and computer. The index is served from /api/search-index.json with a SHA-256 ETag so clients skip re-downloads, and a deterministic sort so the ETag is stable between identical cache refreshes. OU extraction uses the RFC-4514 DN parser so escaped commas like cn=Last\, First,ou=Sales,... no longer produce wrong OU pivots.

Side-panel drawer + per-user pins. Every list row opens a drawer with the full attribute table, pivot links (open full page, other users in this OU, groups for this user, etc.), and an inline editable panel for the top-level user attributes. Pins live in a per-user bbolt store; the path is configurable via --pinned-path / PINNED_PATH. On a read-only filesystem, open failures log a warning and continue without pinning instead of refusing to boot. User DNs are hashed into fixed-length bucket keys so deeply nested AD DNs don't blow past the 255-byte bbolt bucket-name ceiling.

Power browsing (ex-Phase 2). Faceted filters on /users, /groups, /computers: OU, enabled/disabled, last-logon (24 h / 7 d / 30 d / never), member-of. A toggleable OU tree rail sits next to the list. The user drawer gains inline attribute edit for email, description, displayName, title, department, company, phone, mobile, office — form-POST with CSRF, flash banner on failure.

Bulk actions (ex-Phase 3). Multi-select on the list pages, bulk bar across the bottom. /users/bulk takes add-to-group / remove-from-group / delete / disable. /groups/bulk takes add-members / delete. /computers/bulk takes delete / disable. Disable is Active-Directory-only and gated on Config.IsActiveDirectory in both the handler and the template, so non-AD backends still see a clean 501 with an explanatory message instead of a silent failure. Every bulk path sets a session-backed flash before redirecting; the receiving list page pops it and renders "Deleted N of M groups" (or the partial-failure / total-failure variant) above the filter row.

Surfacing silent LDAP failures. Modify handlers now humanise directory errors (Insufficient Access Rights → "The signed-in account doesn't have permission to make this change"; No Such Object → "The target entry no longer exists"; etc.) and render them in a drawer-level drawer__flash--error banner on htmx requests. An AD bounce that previously looked like a successful save is now visible.

AdminCount-based Privileged badge. Replaces the old English-only CN allowlist. Any user with AD's adminCount = 1 (members of protected groups: Domain Admins, Enterprise Admins, Administrators, Account Operators, Backup Operators, etc.) gets a shield icon in the list. Works on localised directories (Domänen-Admins) out of the box.

Nested group management. Parent / child edges on /groups/:dn with cycle-detection BFS, depth-capped at 32. Adding a parent group checks for ancestor cycles; adding a child checks for descendant cycles. No more accidentally self-referencing group graphs.

Dependency bump

github.com/netresearch/simple-ldap-go v1.11.0 → v1.12.0. New on the client: DisableUser / EnableUser / DisableComputer / EnableComputer (plus *Context variants), each read-modify-write on userAccountControl's ACCOUNTDISABLE bit (0x2) while preserving every other flag. User.AdminCount bool field. Exported ACCOUNTDISABLE = 0x2 constant.

Behavioural notes

  • Disable is AD-only. OpenLDAP inetOrgPerson has no portable disable attribute; calls return a clear "userAccountControl attribute missing (not an Active Directory entry?)" error. Consumers should gate on Config.IsActiveDirectory before offering the action in UI.
  • AdminCount is sticky — AD does not clear it when a user leaves a protected group. true therefore means "is or was privileged at some point", which is good enough for UI flagging but not for authorisation decisions.
  • Pinning becomes a no-op on a read-only filesystem instead of blocking boot. Operators who want persistent pinning must provide a writable --pinned-path.

Quality

  • TestHeaderDoesNotShrinkWithLongLists — 200-user seed + three viewport sizes, asserts topnav height is identical on a list page and on / so body-flex pressure from long lists can't collapse the chrome.
  • TestSelectAllAlignsWithSearch — bounding-box Y-center comparison, catches Pico's default label { margin-bottom } trying to push the chip off the baseline.
  • TestFragmentURL_DirectNavIsScrollable — asserts computed html overflow/height when body.has-page-scroll is set, so the scroll-clip bug can't return.
  • TestAddRemoveGroupMembership + TestAddGroupAsNonAdminShowsFlash — Playwright journeys against OpenLDAP for the drawer's add/remove and the silent-failure → flash path.
  • TestSearchIndex_ETagStableAcrossInvocations — three back-to-back fetches must produce the same ETag after the deterministic-sort fix.
  • TestImmediateOU — 9 DN cases including escaped-comma regression.
  • TestPinnedStore_LongUserDN — round-trip on a >255-byte DN.
  • TestPinnedStore_NilReceiver — the nil-safe pinning API.

Full unit + e2e suites green: 202-user OpenLDAP seed, go test -tags e2e ./internal/e2e passes in under 90 s. golangci-lint run reports zero issues.

Upgrade

For tagged-image consumers: ghcr.io/netresearch/ldap-manager:v1.3.0 (linux/386, amd64, arm/v6, arm/v7, arm64). No config migration needed — all existing flags and environment variables keep working. New optional flag --pinned-path / PINNED_PATH (empty keeps the existing auto-placement under the session file's directory; sentinel values none / off / disabled skip the store entirely).

PR

#571 — 100+ atomic commits, 18/18 Copilot review threads resolved.