Skip to content

Commit 98e9acb

Browse files
hotfix(condo): Returned support rights to visit billing miniapps temporally
1 parent e200053 commit 98e9acb

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

apps/condo/domains/miniapp/components/AppIndex/BillingAppPage.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@ import React, { useEffect } from 'react'
22
import get from 'lodash/get'
33
import { useRouter } from 'next/router'
44
import Head from 'next/head'
5-
import { useAuth } from '@open-condo/next/auth'
65
import { useIntl } from '@open-condo/next/intl'
76
import { useOrganization } from '@open-condo/next/organization'
87
import { Typography } from '@open-condo/ui'
9-
import LoadingOrErrorPage from '@condo/domains/common/components/containers/LoadingOrErrorPage'
108
import { PageContent, PageWrapper, PageHeader } from '@condo/domains/common/components/containers/BaseLayout'
119
import IFrame from '@condo/domains/common/components/IFrame'
1210
import { BillingIntegrationOrganizationContext } from '@condo/domains/billing/utils/clientSchema'
@@ -20,12 +18,8 @@ type BillingAppPageProps = {
2018
export const BillingAppPage: React.FC<BillingAppPageProps> = ({ id }) => {
2119
const intl = useIntl()
2220
const FallbackPageTitle = intl.formatMessage({ id: 'global.section.miniapps' })
23-
const NoPermissionMessage = intl.formatMessage({ id: 'global.noPageViewPermission' })
2421

2522
const router = useRouter()
26-
const auth = useAuth()
27-
const isSupport = get(auth, ['user', 'isSupport'], false)
28-
const isAdmin = get(auth, ['user', 'isAdmin'], false)
2923
const userOrganization = useOrganization()
3024
const organizationId = get(userOrganization, ['organization', 'id'], null)
3125

@@ -46,9 +40,10 @@ export const BillingAppPage: React.FC<BillingAppPageProps> = ({ id }) => {
4640
}
4741
}, [id, loading, error, context, appUrl, router])
4842

49-
if (isSupport || isAdmin) {
50-
return <LoadingOrErrorPage title={FallbackPageTitle} error={NoPermissionMessage}/>
51-
}
43+
// TODO(DOMA-5005): Return this restriction back till token scopes will be implemented
44+
// if (isSupport || isAdmin) {
45+
// return <LoadingOrErrorPage title={FallbackPageTitle} error={NoPermissionMessage}/>
46+
// }
5247

5348

5449
return (

0 commit comments

Comments
 (0)