shared-recruiting-co icon indicating copy to clipboard operation
shared-recruiting-co copied to clipboard

Support Multiple Emails per Account

Open devstein opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. As a user, I connect multiple emails to a single SRC account, so that I can share my login and job opportunities across them.

Describe the solution you'd like From my account page, I can manage and add additional email accounts.

Describe alternatives you've considered The current 1:1 approach is the alternative.

Additional context Right now, there is a 1:1 relationship between a user_id and an email. We are going to have to create a new table (user_email) that maintains a 1:many relationship between a user and their connected emails.

We will also have to add an additional email column to user_oauth_token to account for multiple emails per (user_id, provider).

devstein avatar Jan 02 '23 00:01 devstein

For now, we will add the settings as a jsonb column to the user_profile

{
    "[email protected]": {
        "is_active": true,
        "auto_contribute": true,
        "auto_archive": false,
        "enable_allow_list": false,
        "enable_block_list": false
    }
}

devstein avatar Mar 21 '23 16:03 devstein

It may be better to add it to a separate table. This will help us support "dumb" emails #212

create or replace table user_email (
    user_id uuid,
    email string,
    -- email provider?
    provider string,
    -- sendings are dynamic by provider
    settings jsonb
)

devstein avatar Mar 30 '23 19:03 devstein