Skip to content

feat: add invitation flow to invite users#3844

Merged
nijel merged 1 commit into
mainfrom
hosted-invite
May 26, 2026
Merged

feat: add invitation flow to invite users#3844
nijel merged 1 commit into
mainfrom
hosted-invite

Conversation

@nijel

@nijel nijel commented May 26, 2026

Copy link
Copy Markdown
Member

This allows bringing in users for newly created subscription.

@nijel nijel requested a review from Copilot May 26, 2026 10:58
@nijel nijel self-assigned this May 26, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3b5cf67fcd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread weblate_web/crm/views.py

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c985d1feaf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread weblate_web/crm/tests.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Comment thread weblate_web/crm/views.py Outdated
Comment thread weblate_web/crm/views.py
@argos-ci

argos-ci Bot commented May 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - May 26, 2026, 2:07 PM

@codecov

codecov Bot commented May 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.04453% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.51%. Comparing base (034881a) to head (6523e74).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3844      +/-   ##
==========================================
- Coverage   88.52%   88.51%   -0.01%     
==========================================
  Files          71       72       +1     
  Lines       10885    11120     +235     
  Branches      981     1001      +20     
==========================================
+ Hits         9636     9843     +207     
- Misses        916      933      +17     
- Partials      333      344      +11     
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Comment thread weblate_web/crm/views.py Outdated
Comment thread weblate_web/crm/hosted.py

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ba1085f7d0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread weblate_web/crm/views.py Outdated
This allows bringing in users for newly created subscription.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Comment thread weblate_web/saml.py
Comment on lines +292 to +300
users = {}
if username := profile.get("username"):
query |= Q(username=username)
for user in User.objects.filter(username=username):
if user.username == username:
users[user.pk] = user
if email := profile.get("email"):
query |= Q(email__iexact=email)
if not query:
return []
return list(User.objects.filter(query).distinct())
for user in User.objects.filter(email__iexact=email):
users[user.pk] = user
return list(users.values())

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6523e74fd2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread weblate_web/saml.py
users = {}
if username := profile.get("username"):
for user in self.users_by_username.get(str(username).casefold(), []):
for user in self.users_by_username.get(str(username), []):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore case-insensitive username lookup in preloaded sync

In the preloaded path (sync_hosted_users -> SamlSyncContext.preload -> sync_saml_payload), this exact-key lookup drops legacy username matches that differ only by case. With a payload like username='alice' and an existing local user Alice (and no matching email), get_legacy_candidates() now returns no candidate and sync_saml_identity() creates a new user (alice-1) and links the hosted identity there, splitting one person across two local accounts. This is a regression from the previous casefolded lookup and can corrupt identity linkage during hosted user syncs.

Useful? React with 👍 / 👎.

@nijel nijel merged commit b674838 into main May 26, 2026
37 of 39 checks passed
@nijel nijel deleted the hosted-invite branch May 26, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants