Organization admins can add any user as a member without their agreement
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- python
- Bereich
- authentication, authorization, backend, testing
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Python
- Sterne
- 212
- Forks
- 321
- Ø Merge
- 1 T. 7 Std.
- Gemergte PRs (30 T.)
- 14
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus learningequality/studio
-
Community library status changes don't update `date_updated`Evtl. vergeben @ArpitaSamanta10 hat das heute übernommen. Offencommunity-contribution-in-progress DEV: backend good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
learningequality/studio#6414 · 8 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
DEV: backend
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
learningequality/studio#6410 ·
Maintainer antworten meist innerhalb von 1 Tag
-
DEV: backend
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
learningequality/studio#6409 ·
Maintainer antworten meist innerhalb von 1 Tag
-
DEV: backend
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
learningequality/studio#6407 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Stripe webhook accepts events when no webhook secret is configuredEvtl. vergeben @adibmbrk hat das heute übernommen. Offencommunity-contribution-in-progress DEV: backend good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
learningequality/studio#6404 · 3 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in learningequality/studio
Ähnliche Issues
-
bug good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
aws-samples/sample-spec-driven-presentation-maker#648 ·
Maintainer antworten meist innerhalb von 1 Tag
-
firestore: enable live window.yaml pipeline system tests once add_window_fields is in productionOffen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 64/100
googleapis/google-cloud-python#19115 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 80/100
Maintainer antworten meist innerhalb von 3 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Feyisara2108/stellargive#1377 ·
Maintainer antworten meist innerhalb von 1 Tag
-
CRS WKT default to WKT2Offenenhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag