Organization admins can add any user as a member without their agreement
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 48/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- python
- Domaine
- authentication, authorization, backend, testing
Piste de recherche
Start with contentcuration/viewsets/organization.py, especially OrganizationMemberSerializer and perform_create, then read contentcuration/viewsets/organization_migration.py around is_uncontested. Trace the invitation acceptance path and the regression tests for the two reproduced cases. Done means direct membership creation for another user is rejected, invitation acceptance preserves the invited role, and unaccepted editors require migration approval.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Overview
POST /api/organization-members/ lets an organization admin add any user to the organization, with any role and status, without that user agreeing. Anyone can create an organization and become its admin, so any logged-in user can do this. The response returns the added user's email and name, and a channel editor added this way counts as agreeing to move their channel into the organization.
Complexity: Medium
Target branch: unstable
Context
OrganizationMemberSerializerlimitsorganizationto the requester's organizations, butuseris a plain primary key field over all users.perform_createsaves it as given.- The member viewset returns
user_email,user_first_nameanduser_last_name. - Accepting an organization invitation finds the user with the same case-insensitive email lookup that #6409 fixes on
hotfixes. is_uncontestedtreats a channel migration as needing no administrator approval when every channel editor is an active admin or editor of the target organization.- Reproduced:
- A user creates an organization, then sends
{"organization": <their org>, "user": <any user id>, "status": "inactive"}. The response is 201 with that user's email and name. User ids are sequential integers. - Channel co-editor A creates an organization and adds co-editor B as an active editor. A's
POST /api/channel/<id>/organization_migration/then moves the channel without administrator approval, and A gains organization admin rights over it.
- A user creates an organization, then sends
The Change
- A user should join an organization only by accepting an organization invitation. Admins should not be able to create memberships for other users directly.
is_uncontestedshould count only memberships the user accepted.
Acceptance Criteria
General
-
POST /api/organization-members/for a user other than the requester returns 4xx and creates no membership. - Accepting an organization invitation creates the membership with the invited role.
- Migrating a channel into an organization that one of its editors hasn't joined by accepting an invitation requires administrator approval.
Testing
- Regression tests cover both reproduced cases in Context.
AI usage
I scoped the audit and decided these findings get an unstable issue. Claude Code found and reproduced them and drafted this issue.
- Langage dominant
- Python
- Étoiles
- 212
- Forks
- 321
- Merge moyen
- 1 j 7 h
- PR mergées (30 j)
- 14
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de learningequality/studio
-
Community library status changes don't update `date_updated`Peut-être pris @ArpitaSamanta10 l’a pris aujourd’hui. Ouvertecommunity-contribution-in-progress DEV: backend good first issue help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
learningequality/studio#6414 · 8 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
DEV: backend
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
learningequality/studio#6410 ·
Les mainteneurs répondent en général sous 1 jour
-
DEV: backend
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
learningequality/studio#6409 ·
Les mainteneurs répondent en général sous 1 jour
-
DEV: backend
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
learningequality/studio#6407 ·
Les mainteneurs répondent en général sous 1 jour
-
Stripe webhook accepts events when no webhook secret is configuredPeut-être pris @adibmbrk l’a pris aujourd’hui. Ouvertecommunity-contribution-in-progress DEV: backend good first issue help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
learningequality/studio#6404 · 3 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de learningequality/studio
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 2 jours
-
Reference check: findingsOuverteaudit-reference-check
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
screenrec.com stopped workingOuvertesite-bug triage
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
canonical/paas-charm#407 · 1 commentaire ·
Les mainteneurs répondent en général sous 5 jours