Skip to content

fix(directory): synthesize internal directory member for email principals in web-only auth mode - #244

Open
elf-mouse wants to merge 1 commit into
yc-software:mainfrom
elf-mouse:fix/directory-email-member-synthesis
Open

fix(directory): synthesize internal directory member for email principals in web-only auth mode#244
elf-mouse wants to merge 1 commit into
yc-software:mainfrom
elf-mouse:fix/directory-email-member-synthesis

Conversation

@elf-mouse

@elf-mouse elf-mouse commented Aug 6, 2026

Copy link
Copy Markdown

This commit enables project member search and invitation for email users when Slack directory sync is not enabled:

  1. src/api/routes/directory.ts:

    • Fall back to synthesizing an internal directory member when q is an email address and no matching record exists in directory_members.
  2. src/directory/postgres-directory-store.ts & src/directory/directory-store.ts:

    • Synthesize a valid internal DirectoryMember in get(principalId) for email addresses not present in the Slack directory table, preventing false invalid_member rejections during project member invitation.
  3. test/directory-resolve.test.ts:

    • Add unit test verifying email address resolution fallback.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

…pals in web-only auth mode

This commit enables project member search and invitation for email users when Slack directory sync is not enabled:

1. `src/api/routes/directory.ts`:
   - Fall back to synthesizing an internal directory member when `q` is an email address and no matching record exists in `directory_members`.

2. `src/directory/postgres-directory-store.ts` & `src/directory/directory-store.ts`:
   - Synthesize a valid internal `DirectoryMember` in `get(principalId)` for email addresses not present in the Slack directory table, preventing false `invalid_member` rejections during project member invitation.

3. `test/directory-resolve.test.ts`:
   - Add unit test verifying email address resolution fallback.
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.

1 participant