Accepting an invitation gives the role to a user record looked up by email
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 76/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Bereich
- authentication, backend
Rechercherichtung
Lies Invitation.accept in contentcuration/contentcuration/models.py im Bereich der Zeilen 3701–3710 und verfolge, wie dem ausgewählten Benutzer die Rolle zugewiesen wird. Führe zunächst die Tests zur Annahme von Einladungen aus oder finde sie, und ergänze dann Regressionstests für die Fälle mit doppelter E-Mail-Adresse und ohne aktives Konto. Als abgeschlossen gilt die Arbeit, wenn das aktive Konto mit der exakt übereinstimmenden E-Mail-Adresse die Rolle erhält und ein fehlendes aktives Konto den Status 400 zurückgibt, ohne die Kanal-Editoren oder -Betrachter zu ändern.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Overview
Invitation.accept looks the invited user up again by email, case-insensitively, with no filter on active or deleted users and no ordering. When several user records share the email in different case, the role can go to an inactive or deleted record instead of the user who accepted. When an admin accepts an invitation for an email that has no account, accept adds None as an editor and the request fails with IntegrityError.
Complexity: Low
Target branch: hotfixes
Context
Invitation.acceptstarts withUser.objects.filter(email__iexact=self.email).first().- Reproduced:
- Active user
[email protected]accepts an invitation. An older inactive record[email protected]becomes the channel editor, and the accepting user doesn't. - An admin accepts an invitation for an email with no account, and gets 500 with
IntegrityErroron a nulluser_id.
- Active user
- Related: #4779, #3050. #6406 backports the invitee-only accept check to
hotfixes. #6405 depends on the same lookup onunstable.
The Change
- Accepting should give the role to the active account whose email exactly matches the invitation's. #5893 lets admins accept on an invitee's behalf, so the accepting user isn't always the invitee.
- Accepting an invitation with no matching active account should fail with a validation error and change nothing.
Acceptance Criteria
General
- When other records share the invitee's email in a different case, the active account with the exact email gets the role and no other record does.
- Accepting an invitation whose email has no active account returns 400 and leaves the channel's editors and viewers unchanged.
Testing
- Both reproduced cases in Context have regression tests.
AI usage
I scoped the audit. Claude Code found and reproduced these failures 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 @LightCreator1007 hat das vor 1 Tag übernommen. OffenDEV: backend good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
learningequality/studio#6414 · 3 Kommentare ·
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 78/100
learningequality/studio#6407 ·
Maintainer antworten meist innerhalb von 1 Tag
-
DEV: backend good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
learningequality/studio#6404 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
DEV: backend good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
learningequality/studio#6400 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in learningequality/studio
Ähnliche Issues
-
[Bug]: HTTP 499 (Client Closed Request) is classified as a non-retryable format_error, so a mid-flight abort fails the turn over instead of retryingEvtl. vergeben @yipinghuang1991 hat das heute übernommen. Offencomp/agent P2 type/bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
NousResearch/hermes-agent#156837 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Bug: Missing continue on ValueError in CpanBackend.check_feed causes UnboundLocalError or duplicate yieldsEvtl. vergeben @muskan-creates352 hat das heute übernommen. Offen
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 86/100
fedora-infra/anitya#2188 ·
Maintainer antworten meist innerhalb von 1 Tag
-
docs documentation need-triage SaaS
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
integration:hermes
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
vectorize-io/hindsight#6601 ·
Maintainer antworten meist innerhalb von 1 Tag
-
triage:product type:bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
dbt-labs/dbt-adapters#2333 ·
Maintainer antworten meist innerhalb von 1 Tag