49 lines
3.3 KiB
Markdown
49 lines
3.3 KiB
Markdown
---
|
|
type: User Story
|
|
title: Manage groups efficiently
|
|
description: Administrators use concise policy tables, focused group details, and confirmed modal workflows to manage access groups.
|
|
tags: [admin, groups, usability, authorization]
|
|
timestamp: 2026-08-02T15:03:59Z
|
|
story_id: US-019
|
|
status: verified
|
|
---
|
|
|
|
# User Story
|
|
|
|
As an administrator, I want a concise group policy table and focused group details, so that I can manage access without navigating cumbersome controls.
|
|
|
|
# Acceptance Criteria
|
|
|
|
- [x] The main Groups page lists name, Minecraft access, schedule status, VPN/proxy/Tor access, and effective member count with the default group first and remaining names ordered alphabetically.
|
|
- [x] Policy controls show their current state and require confirmation in an accessible modal before mutation.
|
|
- [x] Selecting a group name opens a detail page with its description, policies, and effective members.
|
|
- [x] Add group opens an accessible modal asking for name, description, Minecraft access, and VPN/proxy/Tor access.
|
|
- [x] New-group policies default to denied and can be enabled before creation.
|
|
- [x] Administrators manage only the display name; an internal collision-safe slug is generated automatically.
|
|
- [x] Administrators can edit group name and description; the protected `everyone` name remains fixed while its description remains editable.
|
|
- [x] Non-default groups can be deleted only after modal confirmation, returning all affected users to `everyone`.
|
|
- [x] Group identity, policy, creation, and deletion mutations commit atomically with their audit events.
|
|
- [x] Modal controls support keyboard operation, focus management, cancellation, and clear pending state.
|
|
- [x] Group details summarize recurring UTC access windows in the browser's local timezone.
|
|
- [x] Administrators use a confirmed modal to add, remove, and replace multiple non-overlapping windows.
|
|
|
|
# Implementation
|
|
|
|
- [`apps/web/src/app/admin/(console)/groups/page.tsx`](../apps/web/src/app/admin/%28console%29/groups/page.tsx)
|
|
- [`apps/web/src/app/admin/(console)/groups/[groupId]/page.tsx`](../apps/web/src/app/admin/%28console%29/groups/%5BgroupId%5D/page.tsx)
|
|
- [`apps/web/src/app/admin/(console)/groups/actions.ts`](../apps/web/src/app/admin/%28console%29/groups/actions.ts)
|
|
- [`apps/web/src/components/admin-modal-form.tsx`](../apps/web/src/components/admin-modal-form.tsx)
|
|
- [`apps/web/src/components/group-policy-control.tsx`](../apps/web/src/components/group-policy-control.tsx)
|
|
- [`apps/web/src/components/group-schedule-editor.tsx`](../apps/web/src/components/group-schedule-editor.tsx)
|
|
- [`apps/web/src/lib/group-management.ts`](../apps/web/src/lib/group-management.ts)
|
|
|
|
# Validation
|
|
|
|
Native-dialog interaction and pending-state behavior are covered by [`apps/web/src/components/admin-modal-form.test.tsx`](../apps/web/src/components/admin-modal-form.test.tsx). Slug, return-path, protected-name, and effective-membership behavior are covered by [`apps/web/src/lib/group-management.test.ts`](../apps/web/src/lib/group-management.test.ts). TypeScript, lint, accessibility review, Semgrep, production build, and OKF validation pass.
|
|
|
|
# Related Stories
|
|
|
|
- [Manage users as an administrator](us-013-admin-user-management.md)
|
|
- [Control Minecraft admission with groups](us-017-group-access.md)
|
|
- [Preserve an audit trail](us-010-audit-events.md)
|