Эх сурвалжийг харах

HUE-9397 [core] Add a config flag to enable/disable document sharing

Johan Ahlen 5 жил өмнө
parent
commit
fc822ba779

+ 4 - 0
desktop/conf.dist/hue.ini

@@ -203,6 +203,10 @@
   # e.g. Query result in Editors and Dashboards, file in File Browser...
   ## enable_download=true
 
+  # Global setting to enable or disable document sharing.
+  # Note that this does not affect currently shared documents.
+  ## enable_sharing=true
+
   # Choose whether to enable SQL syntax check or not
   ## enable_sql_syntax_check=true
 

+ 4 - 0
desktop/conf/pseudo-distributed.ini.tmpl

@@ -207,6 +207,10 @@
   # e.g. Query result in Editors and Dashboards, file in File Browser...
   ## enable_download=true
 
+  # Global setting to enable or disable document sharing.
+  # Note that this does not affect currently shared documents.
+  ## enable_sharing=true
+
   # Choose whether to enable the new SQL syntax checker or not
   ## enable_sql_syntax_check=true
 

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

@@ -1622,6 +1622,13 @@ ENABLE_DOWNLOAD = Config(
   type=coerce_bool,
   default=True)
 
+ENABLE_SHARING = Config(
+  key="enable_sharing",
+  help=_(
+    'Global setting to enable or disable document sharing. Note that this does not affect currently shared documents.'),
+  type=coerce_bool,
+  default=True)
+
 ENABLE_DJANGO_DEBUG_TOOL = Config(
   key="enable_django_debug_tool",
   help=_('Allow use django debug tool with Chrome browser for debugging issue, django_debug_mode must be true also'),