learningequality / learningequality/studio

Add Organizations to Invitation Model

Open
#5,971 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
191
Forks
307
Avg merge
5d 6h
Merged PRs (30d)
10

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Invitation model and the existing channel invitation implementation, then read the related unit tests. Add organization targets and organization roles while preserving the channel behavior; done means the listed create, update, delete, mixed-target, and role cases are covered and existing tests and lint pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.