- import { Page } from "@budibase/bbui"
-
-
-
-
-
diff --git a/packages/builder/src/pages/builder/portal/manage/users/index.svelte b/packages/builder/src/pages/builder/portal/manage/users/index.svelte
index 6b0037ddab..6d2134ad02 100644
--- a/packages/builder/src/pages/builder/portal/manage/users/index.svelte
+++ b/packages/builder/src/pages/builder/portal/manage/users/index.svelte
@@ -22,6 +22,7 @@
const schema = {
email: {},
developmentAccess: { displayName: "Development Access", type: "boolean" },
+ adminAccess: { displayName: "Admin Access", type: "boolean" },
// role: { type: "options" },
group: {},
// access: {},
@@ -35,7 +36,8 @@
.map(user => ({
...user,
group: ["All users"],
- developmentAccess: user.builder.global,
+ developmentAccess: !!user.builder?.global,
+ adminAccess: !!user.admin?.global,
}))
let createUserModal
diff --git a/packages/builder/src/pages/builder/portal/settings/index.svelte b/packages/builder/src/pages/builder/portal/settings/index.svelte
index 9e264e0583..57825a095b 100644
--- a/packages/builder/src/pages/builder/portal/settings/index.svelte
+++ b/packages/builder/src/pages/builder/portal/settings/index.svelte
@@ -1,4 +1,4 @@
diff --git a/packages/builder/src/pages/builder/portal/settings/organisation.svelte b/packages/builder/src/pages/builder/portal/settings/organisation.svelte
index ec278fa0e4..046f55615b 100644
--- a/packages/builder/src/pages/builder/portal/settings/organisation.svelte
+++ b/packages/builder/src/pages/builder/portal/settings/organisation.svelte
@@ -11,10 +11,18 @@
Dropzone,
notifications,
} from "@budibase/bbui"
- import { organisation } from "stores/portal"
+ import { auth, organisation } from "stores/portal"
import { post } from "builderStore/api"
import analytics from "analytics"
import { writable } from "svelte/store"
+ import { redirect } from "@roxi/routify"
+
+ // Only admins allowed here
+ $: {
+ if (!$auth.isAdmin) {
+ $redirect("../../portal")
+ }
+ }
const values = writable({
analytics: !analytics.disabled(),
@@ -64,68 +72,70 @@
}
-
-
- Organisation
-
- Organisation settings is where you can edit your organisation name and
- logo. You can also configure your platform URL and enable or disable
- analytics.
-
-
-
-
- Information
- Here you can update your logo and organization name.
-
-
-
-
-
-
-
-
-
- {
- $values.logo = e.detail?.[0]
- }}
- />
-
-
-
-
-
- Platform
- Here you can set up general platform settings.
-
-
-
-
-
-
-
-
-
+{#if $auth.isAdmin}
+
- Analytics
-
- If you would like to send analytics that help us make Budibase better,
- please let us know below.
+ Organisation
+
+ Organisation settings is where you can edit your organisation name and
+ logo. You can also configure your platform URL and enable or disable
+ analytics.
+
+
+ Information
+ Here you can update your logo and organization name.
+
-
-
+
+
+
+
+
+
+ {
+ $values.logo = e.detail?.[0]
+ }}
+ />
+
+
+
+ Platform
+ Here you can set up general platform settings.
+
+
+
+
+
+
+
+
+
+
+ Analytics
+
+ If you would like to send analytics that help us make Budibase better,
+ please let us know below.
+
+
+