Pre-review tidy, add new badge to plugins

This commit is contained in:
Rory Powell 2022-09-15 11:23:51 +01:00
parent 0980be9377
commit ff8760e860
5 changed files with 12 additions and 17 deletions

View File

@ -6,6 +6,7 @@ exports.UserStatus = {
exports.Cookies = {
CurrentApp: "budibase:currentapp",
Auth: "budibase:auth",
Init: "budibase:init",
RETURN_URL: "budibase:returnurl",
DatasourceAuth: "budibase:datasourceauth",
OIDC_CONFIG: "budibase:oidc:config",

View File

@ -10,7 +10,6 @@ import { getGlobalDB, doInTenant } from "../tenancy"
import { decrypt } from "../security/encryption"
const identity = require("../context/identity")
const env = require("../environment")
import { User } from "@budibase/types"
const ONE_MINUTE = env.SESSION_UPDATE_PERIOD || 60 * 1000
@ -68,11 +67,7 @@ async function checkApiKey(apiKey: string, populateUser?: Function) {
*/
export = (
noAuthPatterns = [],
opts: {
publicAllowed: boolean
populateUser?: Function
checkDayPass?: (ctx: any, user: User, tenantId: string) => Promise<void>
} = {
opts: { publicAllowed: boolean; populateUser?: Function } = {
publicAllowed: false,
}
) => {
@ -112,10 +107,7 @@ export = (
}
user.csrfToken = session.csrfToken
if (
!session.lastAccessedAt ||
session.lastAccessedAt < timeMinusOneMinute()
) {
if (session?.lastAccessedAt < timeMinusOneMinute()) {
// make sure we denote that the session is still in use
await updateSessionTTL(session)
}

View File

@ -54,7 +54,11 @@
: undefined,
{ title: "Auth", href: "/builder/portal/manage/auth" },
{ title: "Email", href: "/builder/portal/manage/email" },
{ title: "Plugins", href: "/builder/portal/manage/plugins" },
{
title: "Plugins",
href: "/builder/portal/manage/plugins",
badge: "New",
},
{
title: "Organisation",

View File

@ -2,8 +2,6 @@ const { BUILTIN_ROLE_IDS } = require("@budibase/backend-core/roles")
const { checkPermissionsEndpoint } = require("./utilities/TestFunctions")
const setup = require("./utilities")
jest.setTimeout(100000)
jest.mock("../../../utilities/workerRequests", () => ({
getGlobalUsers: jest.fn(() => {
return {}

View File

@ -1,11 +1,11 @@
import { PriceDuration } from "./plan"
export interface CustomerBilling {
export interface Customer {
balance: number | null | undefined
currency: string | null | undefined
}
export interface SubscriptionBilling {
export interface Subscription {
amount: number
quantity: number
duration: PriceDuration
@ -15,6 +15,6 @@ export interface SubscriptionBilling {
}
export interface Billing {
customer: CustomerBilling
subscription?: SubscriptionBilling
customer: Customer
subscription?: Subscription
}