diff options
Diffstat (limited to 'server/sonar-web/src/main/js/helpers/almIntegrations.ts')
-rw-r--r-- | server/sonar-web/src/main/js/helpers/almIntegrations.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/helpers/almIntegrations.ts b/server/sonar-web/src/main/js/helpers/almIntegrations.ts index c3cfc0744a3..dfe28e3dd53 100644 --- a/server/sonar-web/src/main/js/helpers/almIntegrations.ts +++ b/server/sonar-web/src/main/js/helpers/almIntegrations.ts @@ -29,6 +29,12 @@ export function getAlmMembersUrl(key: string, url: string): string { return url + 'profile/members'; } +export function getUserAlmKey(user: T.CurrentUser) { + return isLoggedIn(user) && user.externalProvider + ? sanitizeAlmId(user.externalProvider) + : undefined; +} + export function hasAdvancedALMIntegration(user: T.CurrentUser) { return ( isLoggedIn(user) && (isBitbucket(user.externalProvider) || isGithub(user.externalProvider)) |