1
0
Fork 0
mirror of synced 2024-09-30 00:57:16 +13:00
budibase/packages/server/src/constants/index.js
Martin McKeaveney c225d54e99 extract constant
2020-11-25 15:03:19 +00:00

42 lines
855 B
JavaScript

const { BUILTIN_LEVEL_IDS } = require("../utilities/security/accessLevels")
const AuthTypes = {
APP: "app",
BUILDER: "builder",
EXTERNAL: "external",
}
const USERS_TABLE_SCHEMA = {
_id: "ta_users",
type: "table",
views: {},
name: "Users",
schema: {
username: {
type: "string",
constraints: {
type: "string",
length: {
maximum: "",
},
presence: true,
},
fieldName: "username",
name: "username",
},
accessLevelId: {
fieldName: "accessLevelId",
name: "accessLevelId",
type: "options",
constraints: {
type: "string",
presence: false,
inclusion: Object.keys(BUILTIN_LEVEL_IDS),
},
},
},
primaryDisplay: "username",
}
exports.AuthTypes = AuthTypes
exports.USERS_TABLE_SCHEMA = USERS_TABLE_SCHEMA