45 lines
2.1 KiB
Markdown
45 lines
2.1 KiB
Markdown
---
|
|
type: User Story
|
|
title: Control Minecraft admission with groups
|
|
description: Administrators assign users to groups and enable Minecraft access through explicit group policy.
|
|
tags: [admin, groups, authorization, velocity, security]
|
|
timestamp: 2026-08-01T22:36:20Z
|
|
story_id: US-017
|
|
status: verified
|
|
---
|
|
|
|
# User Story
|
|
|
|
As an administrator, I want to organize registered users into access groups, so that server admission can be enabled for selected communities while remaining off by default.
|
|
|
|
# Acceptance Criteria
|
|
|
|
- [x] Every registered user implicitly belongs to the protected `everyone` group.
|
|
- [x] The `everyone` group is created with Minecraft access disabled.
|
|
- [x] Administrators can create groups with access disabled by default.
|
|
- [x] Administrators can add and remove users from non-default groups.
|
|
- [x] Administrators can enable or disable Minecraft admission for each group.
|
|
- [x] A registered player is admitted when any assigned group has access enabled.
|
|
- [x] A registered player is denied when none of their groups has access enabled.
|
|
- [x] Group creation, membership, and access-policy changes are audited.
|
|
- [x] Users and administrators can inspect the user's effective group assignments.
|
|
|
|
# Implementation
|
|
|
|
- [`packages/database/src/schema.ts`](../packages/database/src/schema.ts)
|
|
- [`packages/database/drizzle/0002_simple_queen_noir.sql`](../packages/database/drizzle/0002_simple_queen_noir.sql)
|
|
- [`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/api/velocity/access/route.ts`](../apps/web/src/app/api/velocity/access/route.ts)
|
|
|
|
# Validation
|
|
|
|
- [`packages/auth/test/group-access.test.ts`](../packages/auth/test/group-access.test.ts)
|
|
- Drizzle migration generation, TypeScript validation, tests, lint, and the production build must pass.
|
|
|
|
# Related Stories
|
|
|
|
- [Enforce registration at Velocity](us-009-velocity-admission.md)
|
|
- [Manage users as an administrator](us-013-admin-user-management.md)
|
|
- [Preserve an audit trail](us-010-audit-events.md)
|