diff --git a/packages/builder/cypress/integration/createUser.spec.js b/packages/builder/cypress/integration/createUser.spec.js
index b1f737068b..ca2fa225da 100644
--- a/packages/builder/cypress/integration/createUser.spec.js
+++ b/packages/builder/cypress/integration/createUser.spec.js
@@ -9,9 +9,9 @@ context('Create a User', () => {
// https://on.cypress.io/interacting-with-elements
it('should create a user', () => {
- cy.createUser('bbuser', 'test', 'POWER_USER')
+ cy.addRow(["Users", "bbuser", "test", "POWER_USER"])
- // Check to make sure user was created!
- cy.get("input[disabled]").should('have.value', 'bbuser')
+ // // Check to make sure user was created!
+ // cy.get("input[disabled]").should('have.value', 'bbuser')
})
})
diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte
index e9b461cff0..ee72b36053 100644
--- a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte
+++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte
@@ -31,7 +31,9 @@
table => table._id !== $backendUiStore.draftTable._id
)
$: required = !!field?.constraints?.presence || primaryDisplay
- $: uneditable = $backendUiStore.selectedTable?._id === TableNames.USERS && UNEDITABLE_USER_FIELDS.includes(field.name)
+ $: uneditable =
+ $backendUiStore.selectedTable?._id === TableNames.USERS &&
+ UNEDITABLE_USER_FIELDS.includes(field.name)
async function saveColumn() {
backendUiStore.update(state => {
diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditRowModal.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditRowModal.svelte
index 4ca4a7fd9f..460c04428e 100644
--- a/packages/builder/src/components/backend/DataTable/modals/CreateEditRowModal.svelte
+++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditRowModal.svelte
@@ -41,7 +41,9 @@
onConfirm={saveRow}>
{#if creating && table._id === TableNames.USERS}
-
+
{/if}
{#each tableSchema as [key, meta]}
diff --git a/packages/builder/src/components/settings/SettingsModal.svelte b/packages/builder/src/components/settings/SettingsModal.svelte
index 44ab581521..9b83b506ba 100644
--- a/packages/builder/src/components/settings/SettingsModal.svelte
+++ b/packages/builder/src/components/settings/SettingsModal.svelte
@@ -1,5 +1,5 @@
-
-
-
-
- {#if editMode}
-
- {:else}
-
- {/if}
-
-
-
diff --git a/packages/builder/src/components/settings/tabs/Users.svelte b/packages/builder/src/components/settings/tabs/Users.svelte
deleted file mode 100644
index 9ef5a86235..0000000000
--- a/packages/builder/src/components/settings/tabs/Users.svelte
+++ /dev/null
@@ -1,113 +0,0 @@
-
-
-
-
-
-
- {#await fetchUsersPromise}
- Loading...
- {:then users}
-
- {#each users as user}
- -
-
-
- {:else}
- - No Users found
- {/each}
-
- {:catch err}
- Something went wrong when trying to fetch users. Please refresh (CMD + R /
- CTRL + R) the page and try again.
- {/await}
-
-
-
-
diff --git a/packages/server/src/api/controllers/user.js b/packages/server/src/api/controllers/user.js
index 0be16c32bc..f67ae72a89 100644
--- a/packages/server/src/api/controllers/user.js
+++ b/packages/server/src/api/controllers/user.js
@@ -11,7 +11,7 @@ const {
exports.fetch = async function(ctx) {
const database = new CouchDB(ctx.user.appId)
const data = await database.allDocs(
- getUserParams(null, {
+ getUserParams("", {
include_docs: true,
})
)
diff --git a/packages/server/src/db/utils.js b/packages/server/src/db/utils.js
index 767e892c17..96fd92218e 100644
--- a/packages/server/src/db/utils.js
+++ b/packages/server/src/db/utils.js
@@ -101,8 +101,12 @@ exports.generateRowID = tableId => {
/**
* Gets parameters for retrieving users, this is a utility function for the getDocParams function.
*/
-exports.getUserParams = (username = null, otherProps = {}) => {
- return getDocParams(DocumentTypes.USER, username, otherProps)
+exports.getUserParams = (username = "", otherProps = {}) => {
+ return getDocParams(
+ DocumentTypes.ROW,
+ `${ViewNames.USERS}${SEPARATOR}${DocumentTypes.USER}${SEPARATOR}${username}`,
+ otherProps
+ )
}
/**