Skip to content

[FEAT] Implement members invites#12

Merged
martian56 merged 22 commits intomainfrom
11-implement-members-invites
Mar 24, 2026
Merged

[FEAT] Implement members invites#12
martian56 merged 22 commits intomainfrom
11-implement-members-invites

Conversation

@martian56
Copy link
Copy Markdown
Member

This pull request introduces a comprehensive workspace invitation system, allowing workspace owners to invite users by email and manage invitations. It includes database schema changes, new API endpoints, and OAuth improvements to support invitation tokens during authentication flows.

Key changes:

Workspace Invitation Feature

  • Added a new WorkspaceInvitation model, including fields for email, role, token, inviter, expiration, and acceptance tracking, with relationships to Workspace and User. (api/app/app/modules/workspaces/model.py)
  • Created Alembic migration to add the workspace_invitations table, with appropriate indexes and foreign keys. (api/app/alembic/versions/7d6ba2fe0af9_feat_add_workspace_invitations_table.py)
  • Updated Alembic env imports to include WorkspaceInvitation for metadata. (api/app/alembic/env.py)

API Endpoints for Invitations

  • Implemented endpoints to create, list, retrieve, and accept workspace invitations, including permission checks to restrict actions to workspace owners. (api/app/app/modules/workspaces/invitations.py, api/app/app/modules/workspaces/router.py) [1] [2]
  • Added Pydantic schemas for invitation creation, response, acceptance, and listing. (api/app/app/modules/workspaces/schemas.py)

Repository and Service Layer Support

  • Added repository functions for creating, retrieving, listing, and accepting invitations, including expiration and acceptance logic. (api/app/app/modules/workspaces/repository.py)
  • Implemented service layer logic to enforce owner-only actions and handle invitation acceptance, including auto-adding users to the workspace upon acceptance. (api/app/app/modules/workspaces/service.py)

OAuth Flow Enhancements

  • Modified OAuth state handling to support an optional invite_token, storing it in Redis and appending it to the frontend callback URL if present. (api/app/app/core/redis.py, api/app/app/modules/auth/router.py) [1] [2] [3] [4] [5] [6]

Miscellaneous

  • Bumped the API version to 0.1.0 in pyproject.toml to reflect these new features. (api/app/pyproject.toml)

Closes #11

@martian56 martian56 added this to the Deadline milestone Mar 24, 2026
@martian56 martian56 self-assigned this Mar 24, 2026
@martian56 martian56 merged commit 0dc27aa into main Mar 24, 2026
6 checks passed
@devlaner-coolify-app
Copy link
Copy Markdown

The preview deployment for Loomy UI failed. 🔴

Open Build Logs | Open Application Logs

Last updated at: 2026-03-24 15:40:38 CET

@martian56 martian56 deleted the 11-implement-members-invites branch March 24, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement members invites

3 participants