refactor(app-config): rename canConnect as connectionAllowed
This commit is contained in:
@@ -100,7 +100,7 @@ function ChooseConnectionSubstep(props) {
|
||||
});
|
||||
}
|
||||
|
||||
if (appConfig?.data?.canConnect) {
|
||||
if (appConfig?.data?.connectionAllowed) {
|
||||
options.push({
|
||||
label: formatMessage('chooseConnectionSubstep.addNewSharedConnection'),
|
||||
value: ADD_SHARED_CONNECTION_VALUE,
|
||||
|
@@ -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)
|
||||
}
|
||||
|
@@ -460,7 +460,7 @@ export const AppConfigPropType = PropTypes.shape({
|
||||
id: PropTypes.string,
|
||||
key: PropTypes.string,
|
||||
allowCustomConnection: PropTypes.bool,
|
||||
canConnect: PropTypes.bool,
|
||||
connectionAllowed: PropTypes.bool,
|
||||
canCustomConnect: PropTypes.bool,
|
||||
shared: PropTypes.bool,
|
||||
disabled: PropTypes.bool,
|
||||
|
Reference in New Issue
Block a user