소스 검색

Remove permissions check from wizard

The wizard shouldn't check if a user has permissions for an endpoint.
If it's listed by the API, it has the permissions.
Sergiu Miclea 6 년 전
부모
커밋
d534f2340e
1개의 변경된 파일0개의 추가작업 그리고 22개의 파일을 삭제
  1. 0 22
      src/components/pages/WizardPage/WizardPage.jsx

+ 0 - 22
src/components/pages/WizardPage/WizardPage.jsx

@@ -217,18 +217,6 @@ class WizardPage extends React.Component<Props, State> {
     wizardStore.clearStorageMap()
     wizardStore.setPermalink(wizardStore.data)
 
-    let getConnectionInfo = async () => {
-      if (!source) {
-        return
-      }
-      // Check if user has permission for this endpoint
-      try {
-        await endpointStore.getConnectionInfo(source)
-      } catch (err) {
-        this.handleSourceEndpointChange(null)
-      }
-    }
-    getConnectionInfo()
     if (!source) {
       return
     }
@@ -418,16 +406,6 @@ class WizardPage extends React.Component<Props, State> {
         }
         // Preload source options schema
         loadOptions(source, 'source')
-
-        if (instanceStore.instances.length > 0) {
-          return
-        }
-        try {
-          // Check if user has permission for this endpoint
-          await endpointStore.getConnectionInfo(source)
-        } catch (err) {
-          this.handleSourceEndpointChange(null)
-        }
         break
       }
       case 'vms': {