diff --git a/packages/client/modules/userDashboard/components/OrgIntegrations/OrgIntegrations.tsx b/packages/client/modules/userDashboard/components/OrgIntegrations/OrgIntegrations.tsx
index ae45392db54..0b0ad6a170b 100644
--- a/packages/client/modules/userDashboard/components/OrgIntegrations/OrgIntegrations.tsx
+++ b/packages/client/modules/userDashboard/components/OrgIntegrations/OrgIntegrations.tsx
@@ -1,6 +1,7 @@
import graphql from 'babel-plugin-relay/macro'
import {Suspense} from 'react'
import {useFragment} from 'react-relay'
+import {useHistory} from 'react-router'
import {OrgIntegrations_organization$key} from '../../../../__generated__/OrgIntegrations_organization.graphql'
import {Loader} from '../../../../utils/relay/renderLoader'
import GitLabProviders from './GitLabProviders'
@@ -22,14 +23,25 @@ const OrgIntegrations = (props: Props) => {
id
role
}
+ organizationUsers {
+ edges {
+ node {
+ role
+ }
+ }
+ }
}
`,
organizationRef
)
- const {viewerOrganizationUser} = organization
+ const {id: orgId, viewerOrganizationUser, organizationUsers} = organization
+ const history = useHistory()
const isOrgAdmin = viewerOrganizationUser?.role === 'ORG_ADMIN'
+ const orgUsers = organizationUsers?.edges.map((edge) => edge.node)
+ const isAnyOrgAdmins = orgUsers?.some((user) => user.role === 'ORG_ADMIN')
+
return (