Skip to content

Add Organizations to Invitation Model #5971

Description

@ArthurMousatov

This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Overview

Complexity: Low | Medium | High
Low
Target branch:
unstable

Context

As part of #5786, organizations will require an invitation flow that allows users to join organizations as viewers, editors or co-owners (admins).

An invitation flow already exists in Studio for channels, where channel admins can add other users to a channel as either editors or viewers. Instead of adding a new unique flow for Organization invitations, we can instead re-use the existing invitation flow.

The Change

To accept organizations, the invitation model needs to:

  • Allow Organizations XOR channels to be the invite target
  • Allow Organization roles (viewers, editors, admins)

Out of Scope

Frontend changes are not covered under this issue unless requested. In the future, we'll have to create an organization share component similar to ChannelSharing.vue

Acceptance Criteria

General

  • Invitation Model accepts Organizations as invitee targets
  • Invitation Model accepts Organization roles

Testing

  • Existing tests / lint pass
  • Unit tests to cover new invitation - organization relationship (create, update, delete)
  • Unit test to cover invitations with channel & organization set
  • Unit test to cover channel invitations with organization role (co-owner)

References

Thank you @bjester for bringing attention to the existing invitation model on PR #5953

AI usage

No AI has been used in the writing of this issue, nor in the gathering of documentation / code.

Metadata

Metadata

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions