This commit is contained in:
Martin McKeaveney 2021-05-06 10:57:24 +01:00
parent 7d09bd8d70
commit 42e0b3c1f9
6 changed files with 18 additions and 13 deletions

View File

@ -41,7 +41,8 @@
<Input
label="password"
type="password"
bind:value={adminUser.password} />
bind:value={adminUser.password}
/>
<Button cta on:click={save}>Create super admin user</Button>
</Layout>
</div>

View File

@ -32,13 +32,15 @@
<Item
external
href="https://github.com/Budibase/budibase/discussions"
icon="PeopleGroup">
icon="PeopleGroup"
>
Community
</Item>
<Item
external
href="https://github.com/Budibase/budibase/issues/new/choose"
icon="Bug">
icon="Bug"
>
Raise an issue
</Item>
</Navigation>

View File

@ -11,15 +11,18 @@ export function createAdminStore() {
const onboardingSteps = Object.keys(json)
const stepsComplete = onboardingSteps.reduce((score, step) => score + Number(!!json[step]), 0)
const stepsComplete = onboardingSteps.reduce(
(score, step) => score + Number(!!json[step]),
0
)
set({
checklist: json,
onboardingProgress: stepsComplete / onboardingSteps.length * 100
onboardingProgress: (stepsComplete / onboardingSteps.length) * 100,
})
} catch (err) {
set({
checklist: null
checklist: null,
})
}
}

View File

@ -104,13 +104,14 @@ exports.destroy = async function (ctx) {
}
}
exports.configChecklist = async function(ctx) {
exports.configChecklist = async function (ctx) {
const db = new CouchDB(GLOBAL_DB)
try {
// TODO: Watch get started video
// Apps exist
let allDbs
if (env.COUCH_DB_URL) {
allDbs = await (await fetch(`${env.COUCH_DB_URL}/_all_dbs`)).json()
} else {
@ -120,7 +121,7 @@ exports.configChecklist = async function(ctx) {
// They have set up SMTP
const smtpConfig = await determineScopedConfig(db, {
type: Configs.SMTP
type: Configs.SMTP,
})
// They have set up an admin user
@ -134,7 +135,7 @@ exports.configChecklist = async function(ctx) {
ctx.body = {
apps: appDbNames.length,
smtp: !!smtpConfig,
adminUser
adminUser,
}
} catch (err) {
ctx.throw(err.status, err)

View File

@ -7,8 +7,6 @@ const {
const { hash, getGlobalUserByEmail } = require("@budibase/auth").utils
const { UserStatus } = require("../../../constants")
const FIRST_USER_EMAIL = "test@test.com"
const FIRST_USER_PASSWORD = "test"
const GLOBAL_DB = StaticDatabases.GLOBAL.name
exports.save = async ctx => {

View File

@ -162,7 +162,7 @@ class TestConfiguration {
await this._req(
{
email: "testuser@test.com",
password: "test@test.com"
password: "test@test.com",
},
null,
controllers.users.adminUser