-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
5748 Create contacts for emails sent and received by email aliases #5855
Merged
charlesBochet
merged 31 commits into
main
from
5748-emails-sent-and-received-by-email-aliases-are-not-associated-with-the-workspacemember
Jul 1, 2024
Merged
Changes from 22 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
ad13e25
create service
bosiraphael fb9a34b
implement email-alias-manager
bosiraphael b462058
create oauth2-client-manager and refactor accordingly
bosiraphael 57c3035
add isProfileEmailsReadEnabled logic in google-apis-provider-enabled.…
bosiraphael 5c35469
create feature flag
bosiraphael 1bb80df
add gate
bosiraphael 1a18fe5
refactor email-alias-manager
bosiraphael e508134
refactor
bosiraphael 37fa8aa
Merge branch 'main' into 5748-emails-sent-and-received-by-email-alias…
bosiraphael 636ebe0
wip
bosiraphael 9b5c872
wip
bosiraphael 6141d28
saving email aliases is working
bosiraphael 81e2516
update contact creation rule
bosiraphael df83e70
don't create contacts for own aliases
bosiraphael 13ba49e
add try catch
bosiraphael d994d90
create IsFeatureEnabledService
bosiraphael 08190d9
check if feature flag is enabled before refreshinf email alias
bosiraphael c2b35c4
fix modules
bosiraphael 7b2950e
working with and without feature flag
bosiraphael ad68567
Merge branch 'main' into 5748-emails-sent-and-received-by-email-alias…
charlesBochet 81c66bf
fix log
bosiraphael aec42b0
refactor auth gards
bosiraphael fc1dc06
Merge branch 'main' into 5748-emails-sent-and-received-by-email-alias…
bosiraphael c9fd241
Merge branch 'main' into 5748-emails-sent-and-received-by-email-alias…
bosiraphael fd232c4
Merge branch 'main' into 5748-emails-sent-and-received-by-email-alias…
charlesBochet df2083c
Rename flag
charlesBochet 69ea9e6
Fixes post merge
charlesBochet 32e42ed
Refactor into service vs workspace-service
charlesBochet bc43017
Fix lint
charlesBochet 6f59eaa
Refactor auth guards
charlesBochet 52ea360
Merge branch 'main' into 5748-emails-sent-and-received-by-email-alias…
charlesBochet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 0 additions & 41 deletions
41
...s/twenty-server/src/engine/core-modules/auth/guards/google-apis-provider-enabled.guard.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...twenty-server/src/engine/core-modules/feature-flag/services/is-feature-enabled.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { Injectable } from '@nestjs/common'; | ||
import { InjectRepository } from '@nestjs/typeorm'; | ||
|
||
import { Repository } from 'typeorm'; | ||
|
||
import { | ||
FeatureFlagEntity, | ||
FeatureFlagKeys, | ||
} from 'src/engine/core-modules/feature-flag/feature-flag.entity'; | ||
|
||
@Injectable() | ||
export class IsFeatureEnabledService { | ||
constructor( | ||
@InjectRepository(FeatureFlagEntity, 'core') | ||
private readonly featureFlagRepository: Repository<FeatureFlagEntity>, | ||
) {} | ||
|
||
public async isFeatureEnabled( | ||
key: FeatureFlagKeys, | ||
workspaceId: string, | ||
): Promise<boolean> { | ||
const featureFlag = await this.featureFlagRepository.findOneBy({ | ||
workspaceId, | ||
key, | ||
value: true, | ||
}); | ||
Comment on lines
+22
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider handling potential errors from the database query. |
||
|
||
return !!featureFlag?.value; | ||
bosiraphael marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IsMessagingAliasFetchingEnabled