simpler check using checklist
This commit is contained in:
parent
6a293df4be
commit
2636c9450b
|
@ -2,17 +2,11 @@
|
|||
import { onMount } from "svelte"
|
||||
import { ActionButton } from "@budibase/bbui"
|
||||
import GoogleLogo from "/assets/google-logo.png"
|
||||
import { admin } from "stores/portal"
|
||||
|
||||
let show = false
|
||||
|
||||
async function fetchConfig() {
|
||||
const googleResponse = await api.get(
|
||||
`/api/admin/configs/${ConfigTypes.Google}`
|
||||
)
|
||||
const googleDoc = await googleResponse.json()
|
||||
|
||||
if (googleDoc._id) show = true
|
||||
}
|
||||
$: show = $admin.checklist?.oauth
|
||||
</script>
|
||||
|
||||
{#if show}
|
||||
|
|
|
@ -168,6 +168,11 @@ exports.configChecklist = async function (ctx) {
|
|||
type: Configs.SMTP,
|
||||
})
|
||||
|
||||
// They have set up Google Auth
|
||||
const oauthConfig = await getScopedFullConfig(db, {
|
||||
type: Configs.GOOGLE,
|
||||
})
|
||||
|
||||
// They have set up an admin user
|
||||
const users = await db.allDocs(
|
||||
getGlobalUserParams(null, {
|
||||
|
@ -180,6 +185,7 @@ exports.configChecklist = async function (ctx) {
|
|||
apps: appDbNames.length,
|
||||
smtp: !!smtpConfig,
|
||||
adminUser,
|
||||
oauth: !!oauthConfig,
|
||||
}
|
||||
} catch (err) {
|
||||
ctx.throw(err.status, err)
|
||||
|
|
Loading…
Reference in New Issue