Skip to content

fix(identity): harden admin checks and campsite_user_id backfill - #2166

Merged
genedna merged 1 commit into
gitmono-dev:mainfrom
benjamin-747:main
Aug 6, 2026
Merged

fix(identity): harden admin checks and campsite_user_id backfill#2166
genedna merged 1 commit into
gitmono-dev:mainfrom
benjamin-747:main

Conversation

@benjamin-747

Copy link
Copy Markdown
Collaborator

Always treat monorepo.admin as runtime admins (union with Cedar), resolve identity backfill PK collisions before renaming handles, and return 404 when a CL reviewer is missing instead of 500.

Always treat monorepo.admin as runtime admins (union with Cedar), resolve
identity backfill PK collisions before renaming handles, and return 404
when a CL reviewer is missing instead of 500.

@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: d6de75dd97

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

for table in [
"cla_sign_status",
"user_approval_status",
"user_notification_settings",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve notification preferences before deleting settings

When a handle and its campsite id both already have user_notification_settings rows, this collision path deletes the handle settings row. The preferences table has an ON DELETE CASCADE FK to settings (jupiter-migrate/src/migration/m20260224_230000_create_notification_center.rs:159-160), so the delete removes all of the handle's per-event notification overrides before the later rename/merge can move them. Users with pre-backfill notification overrides lose those preferences during identity backfill; merge/update preferences before deleting the settings row, or exclude settings from this delete path.

Useful? React with 👍 / 👎.

@genedna
genedna added this pull request to the merge queue Aug 6, 2026
Merged via the queue into gitmono-dev:main with commit e1aeac7 Aug 6, 2026
9 checks passed
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