nsarrazin commited on
Commit
31d4584
·
unverified ·
1 Parent(s): aa6f1a7

feat: put export behind feature flag (#1862)

Browse files

* feat: put export behind feature lfag

* fix: update SHA tag configuration in deploy-prod workflow

.env CHANGED
@@ -149,7 +149,7 @@ ENABLE_ASSISTANTS_RAG=false # /!\ This will let users specify arbitrary URLs tha
149
  REQUIRE_FEATURED_ASSISTANTS=false # require featured assistants to show in the list
150
  COMMUNITY_TOOLS=false # set to true to enable community tools
151
  ALLOW_IFRAME=true # Allow the app to be embedded in an iframe
152
-
153
 
154
  ### Tools ###
155
  # Check out public config in `chart/env/prod.yaml` for more details
 
149
  REQUIRE_FEATURED_ASSISTANTS=false # require featured assistants to show in the list
150
  COMMUNITY_TOOLS=false # set to true to enable community tools
151
  ALLOW_IFRAME=true # Allow the app to be embedded in an iframe
152
+ ENABLE_DATA_EXPORT=true
153
 
154
  ### Tools ###
155
  # Check out public config in `chart/env/prod.yaml` for more details
.github/workflows/deploy-prod.yml CHANGED
@@ -24,7 +24,7 @@ jobs:
24
  huggingface/chat-ui
25
  tags: |
26
  type=raw,value=latest,enable={{is_default_branch}}
27
- type=sha,enable={{is_default_branch}}
28
 
29
  - name: Set up Docker Buildx
30
  uses: docker/setup-buildx-action@v3
 
24
  huggingface/chat-ui
25
  tags: |
26
  type=raw,value=latest,enable={{is_default_branch}}
27
+ type=sha,enable=true,prefix=sha-,format=short,sha-len=8
28
 
29
  - name: Set up Docker Buildx
30
  uses: docker/setup-buildx-action@v3
src/lib/server/api/routes/groups/misc.ts CHANGED
@@ -116,6 +116,10 @@ export const misc = new Elysia()
116
  throw new Error("Not admin");
117
  }
118
 
 
 
 
 
119
  const zipfile = new yazl.ZipFile();
120
 
121
  const promises = [
 
116
  throw new Error("Not admin");
117
  }
118
 
119
+ if (config.ENABLE_DATA_EXPORT !== "true") {
120
+ throw new Error("Data export is not enabled");
121
+ }
122
+
123
  const zipfile = new yazl.ZipFile();
124
 
125
  const promises = [