refactor(app-config): rename canConnect as connectionAllowed
This commit is contained in:
@@ -77,14 +77,14 @@ export default function Application() {
|
||||
|
||||
const connectionOptions = React.useMemo(() => {
|
||||
const shouldHaveCustomConnection =
|
||||
appConfig?.data?.canConnect && appConfig?.data?.canCustomConnect;
|
||||
appConfig?.data?.connectionAllowed && appConfig?.data?.canCustomConnect;
|
||||
|
||||
const options = [
|
||||
{
|
||||
label: formatMessage('app.addConnection'),
|
||||
key: 'addConnection',
|
||||
'data-test': 'add-connection-button',
|
||||
to: URLS.APP_ADD_CONNECTION(appKey, appConfig?.data?.canConnect),
|
||||
to: URLS.APP_ADD_CONNECTION(appKey, appConfig?.data?.connectionAllowed),
|
||||
disabled: !currentUserAbility.can('create', 'Connection'),
|
||||
},
|
||||
];
|
||||
@@ -155,7 +155,7 @@ export default function Application() {
|
||||
disabled={
|
||||
!allowed ||
|
||||
(appConfig?.data &&
|
||||
!appConfig?.data?.canConnect &&
|
||||
!appConfig?.data?.connectionAllowed &&
|
||||
!appConfig?.data?.canCustomConnect) ||
|
||||
connectionOptions.every(({ disabled }) => disabled)
|
||||
}
|
||||
|
Reference in New Issue
Block a user