소스 검색

HUE-8758 [connectors] Add a flag to turn the feature on

Romain 6 년 전
부모
커밋
717407e89c
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 7 1
      desktop/core/src/desktop/conf.py

+ 7 - 1
desktop/core/src/desktop/conf.py

@@ -1784,7 +1784,7 @@ def has_multi_clusters():
 
 def has_connectors():
   '''When the connector feature is turned on'''
-  return len(CONNECTORS.get()) >= 1
+  return ENABLE_CONNECTORS.get()
 
 
 CLUSTERS = UnspecifiedConfigSection(
@@ -1815,6 +1815,12 @@ CLUSTERS = UnspecifiedConfigSection(
   )
 )
 
+ENABLE_CONNECTORS = Config(
+  key='enable_connectors',
+  default=False,
+  type=coerce_bool,
+  help=_('Turn on the Connector configuration and usage.')
+)
 
 CONNECTORS = UnspecifiedConfigSection(
   key='connectors',