From 33deca13040f810edaef445f5339823bcb2113b3 Mon Sep 17 00:00:00 2001
From: Ruben Fiszel
Date: Thu, 21 Sep 2023 12:49:31 +0200
Subject: [PATCH] setup improvements
---
README.md | 2 +-
frontend/src/lib/components/InstanceSettings.svelte | 3 ---
.../(root)/(logged)/user/(user)/workspaces/+page.svelte | 9 +++++++--
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index eee63e130b..002a9990f3 100644
--- a/README.md
+++ b/README.md
@@ -395,7 +395,7 @@ it being synced automatically everyday.
| SMTP_USERNAME | None | username for the smtp server to send invite emails | Server |
| SMTP_PASSWORD | None | password for the smtp server to send invite emails | Server |
| SMTP_TLS_IMPLICIT | false | https://docs.rs/mail-send/latest/mail_send/struct.SmtpClientBuilder.html#method.implicit_tlsemails | Server |
-| CREATE_WORKSPACE_REQUIRE_SUPERADMIN | false | If true, only superadmin can create workspaces | Server |
+| CREATE_WORKSPACE_REQUIRE_SUPERADMIN | true | If true, only superadmin can create workspaces | Server |
| GLOBAL_ERROR_HANDLER_PATH_IN_ADMINS_WORKSPACE | None | Path to a script to run when a root job fails. The script will be run in and from the admins workspace | Server |
| WHITELIST_ENVS | None | List of envs variables, separated by a ',' that are whitelisted as being safe to passthrough the workers | Worker |
| SAML_METADATA | None | SAML Metadata URL to enable SAML SSO (EE only) | Server |
diff --git a/frontend/src/lib/components/InstanceSettings.svelte b/frontend/src/lib/components/InstanceSettings.svelte
index 7e5c76f8b6..fa0a29233a 100644
--- a/frontend/src/lib/components/InstanceSettings.svelte
+++ b/frontend/src/lib/components/InstanceSettings.svelte
@@ -14,7 +14,6 @@
import KeycloakSetting from './KeycloakSetting.svelte'
import Alert from './common/alert/Alert.svelte'
import { isCloudHosted } from '$lib/cloud'
- import { createEventDispatcher } from 'svelte'
export const settings: Record = {
Core: [
@@ -183,8 +182,6 @@
}
}
- const dispatch = createEventDispatcher()
-
let oauths: Record = {}
let resourceName = ''
diff --git a/frontend/src/routes/(root)/(logged)/user/(user)/workspaces/+page.svelte b/frontend/src/routes/(root)/(logged)/user/(user)/workspaces/+page.svelte
index fad59c1dd8..ce8ce4c28c 100644
--- a/frontend/src/routes/(root)/(logged)/user/(user)/workspaces/+page.svelte
+++ b/frontend/src/routes/(root)/(logged)/user/(user)/workspaces/+page.svelte
@@ -75,6 +75,9 @@
$: adminsInstance = workspaces?.find((x) => x.id == 'admins')
+ $: nonAdminWorkspaces = (workspaces ?? []).filter((x) => x.id != 'admins')
+ $: noWorkspaces = $superadmin && nonAdminWorkspaces.length == 0
+
onMount(() => {
loadInvites()
loadWorkspaces()
@@ -123,7 +126,7 @@
workspace.
{/if}
- {#each workspaces.filter((x) => x.id != 'admins') as workspace}
+ {#each nonAdminWorkspaces as workspace}