Skip to content

Commit

Permalink
Merge branch 'master' into bugfix-2fa-input-ux
Browse files Browse the repository at this point in the history
  • Loading branch information
lcampbell2 committed Jul 27, 2023
2 parents 1bb828f + bb2e060 commit cbd84d8
Show file tree
Hide file tree
Showing 4 changed files with 145 additions and 44 deletions.
10 changes: 10 additions & 0 deletions api/src/affiliation/mutations/request-org-affiliation.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { t } from '@lingui/macro'
import { inviteUserToOrgUnion } from '../unions'
import { logActivity } from '../../audit-logs/mutations/log-activity'

const { SERVICE_ACCOUNT_EMAIL } = process.env

export const requestOrgAffiliation = new mutationWithClientMutationId({
name: 'RequestOrgAffiliation',
description: `This mutation allows users to request to join an organization.`,
Expand Down Expand Up @@ -146,6 +148,14 @@ export const requestOrgAffiliation = new mutationWithClientMutationId({
throw new Error(i18n._(t`Unable to request invite. Please try again.`))
}

if (typeof SERVICE_ACCOUNT_EMAIL !== 'undefined')
orgAdmins.push({
userName: SERVICE_ACCOUNT_EMAIL,
displayName: 'Service Account',
preferredLang: 'en',
_key: 'service-account',
})

if (orgAdmins.length > 0) {
const adminLink = `https://${request.get('host')}/admin/organizations`
// send notification to org admins
Expand Down
2 changes: 1 addition & 1 deletion app/bases/tracker-api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
- name: database-config
mountPath: /app
containers:
- image: gcr.io/track-compliance/api-js:master-0d8b7d2-1690200755 # {"$imagepolicy": "flux-system:api"}
- image: gcr.io/track-compliance/api-js:master-b60151d-1690482627 # {"$imagepolicy": "flux-system:api"}
name: api
ports:
- containerPort: 4000
Expand Down
Loading

0 comments on commit cbd84d8

Please sign in to comment.