/** * Constants and enums. * @module app/constants */ // Dotenv is loaded here for the benefit of command-line scripts import dotenv from "dotenv"; dotenv.config(); import { enumLookup } from "app/utils/data_utils"; // The Knex configuration file lives outside the main source tree. export { default as knexfile } from "../../knexfile"; export const ROLE_ENUM = { [-1]: "system", 0: "guest", 1: "analyst", 2: "moderator", 3: "admin", }; export const ROLES = enumLookup(ROLE_ENUM); export const PERMISSIONS_ENUM = { 0: "DENY", 1: "ALLOW_FOR_OWNER", 2: "ALLOW", }; export const PERMISSIONS = enumLookup(PERMISSIONS_ENUM); export const CRUD_VERBS = { get: "read", post: "create", put: "update", delete: "destroy", };