hoangsonww / hoangsonww/Threadline-RealTime-Collab

Add a way to revoke explicit room membership

Open
#3 0 comments 0 reactions 1 assignee Claimed by @hoangsonww View on GitHub
bug documentation enhancement good first issue help wanted
Dominant language
TypeScript
Stars
3
Forks
1
Avg merge
6h 39m
Merged PRs (30d)
4

Description

## Problem

`POST /v1/rooms/:roomId/members` grants explicit membership on a restricted or confidential room, but there's no matching `DELETE`. Today the only way to remove someone's access to a restricted room is to remove them from the whole organization — which also strips every other room they're a member of.

## Proposed solution

- Add `DELETE /v1/rooms/:roomId/members/:userId` to `apps/api`, gated through the same `canRoom(..., "manage_members")` check `policy.ts` already uses for the existing grant endpoint.
- Add a regression test alongside the existing room-membership tests in `apps/api/src/app.test.ts` (grant, then revoke, then assert the revoked user gets `403` on room read/ticket).
- Add a "Remove access" action to `room-members-page.tsx` next to the existing "Grant access" flow.

## References

- [`docs/roadmap.md`](https://github.com/hoangsonww/Threadline-RealTime-Collab/blob/main/docs/roadmap.md) — "No way to revoke explicit room membership"
- [`docs/api.md#organizations--rooms`](https://github.com/hoangsonww/Threadline-RealTime-Collab/blob/main/docs/api.md)
- [`docs/realtime.md#known-limitations`](https://github.com/hoangsonww/Threadline-RealTime-Collab/blob/main/docs/realtime.md)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.