Skip to content

feat: Phase 5 team rollout - team model, permissions, onboarding, shared graph#52

Merged
linhdmn merged 1 commit into
mainfrom
feat/v2-team-rollout
May 21, 2026
Merged

feat: Phase 5 team rollout - team model, permissions, onboarding, shared graph#52
linhdmn merged 1 commit into
mainfrom
feat/v2-team-rollout

Conversation

@linhdmn
Copy link
Copy Markdown
Member

@linhdmn linhdmn commented May 18, 2026

Summary

  • Team model with members, roles, permissions (Read, Write, Admin)
  • Team CRUD operations: create_team, get_team, update_team, delete_team, list_teams
  • Team invites: create_team_invite, accept_team_invite, get_team_invites, delete_team_invite
  • Team member management: add_team_member, remove_team_member
  • Graph permissions: check_graph_permission, set_read_users, set_write_users
  • CLI commands: team create, team list, team show, team invite, team accept, etc.
  • REST API endpoints: GET/POST /api/teams, POST /api/teams/:id/invites/accept

Test plan

  • cargo build --release passes
  • cargo test --lib - 354 passed
  • cargo run --release -- team --help works

…red graph

Implements team management features for LeanKG v2:

- Team model with members, roles (admin/contributor/viewer), and permissions
- Graph read/write permissions per team for shared graph management
- Onboarding workflow with invite tokens, accept, and setup
- Team CLI commands: create, list, show, update, delete, add/remove members
- Invite management: invite, accept, revoke with expiration
- Permission checking for graph access control
- REST API endpoints for all team operations

Models:
- Team: id, name, description, owner_id, graph_read_users, graph_write_users, members
- TeamMember: user_id, role, joined_at
- TeamInvite: token, team_id, email, role, expires_at, accepted status
- GraphPermission: Read, Write, Admin enum

Database schema added:
- teams table with owner index
- team_invites table with team and token indexes

Test coverage for new models included.
@linhdmn linhdmn merged commit 60905b6 into main May 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant