diff --git a/packages/builder/src/pages/builder/portal/apps/index.svelte b/packages/builder/src/pages/builder/portal/apps/index.svelte index 59267f37e7..cc92cd1bb5 100644 --- a/packages/builder/src/pages/builder/portal/apps/index.svelte +++ b/packages/builder/src/pages/builder/portal/apps/index.svelte @@ -234,7 +234,7 @@ - {#if enrichedApps.length} + {#if !enrichedApps.length}
{#if $auth.user && sdk.users.isGlobalBuilder($auth.user)} diff --git a/packages/pro b/packages/pro index 8e00c6f4bb..ca41b937a8 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit 8e00c6f4bbd3c02de32872819d4a053dc7c0c058 +Subproject commit ca41b937a80e38dc1ff4746b555cbb0e673a75ad diff --git a/packages/server/src/api/routes/public/index.ts b/packages/server/src/api/routes/public/index.ts index 6852778e68..4cc1eff8a4 100644 --- a/packages/server/src/api/routes/public/index.ts +++ b/packages/server/src/api/routes/public/index.ts @@ -7,14 +7,14 @@ import userEndpoints from "./users" import authorized from "../../../middleware/authorized" import publicApi from "../../../middleware/publicApi" import { paramResource, paramSubResource } from "../../../middleware/resourceId" +import { PermissionType, PermissionLevel } from "@budibase/types" import { CtxFn } from "./utils/Endpoint" import mapperMiddleware from "./middleware/mapper" import env from "../../../environment" // below imports don't have declaration files const Router = require("@koa/router") const { RateLimit, Stores } = require("koa2-ratelimit") -import { middleware, redis, permissions } from "@budibase/backend-core" -const { PermissionType, PermissionLevel } = permissions +import { middleware, redis } from "@budibase/backend-core" const PREFIX = "/api/public/v1" // allow a lot more requests when in test @@ -111,7 +111,7 @@ function applyAdminRoutes(endpoints: any) { function applyRoutes( endpoints: any, - permType: string, + permType: PermissionType, resource: string, subResource?: string ) { diff --git a/packages/worker/src/api/controllers/global/roles.ts b/packages/worker/src/api/controllers/global/roles.ts index 457587120f..7b9ce74e3e 100644 --- a/packages/worker/src/api/controllers/global/roles.ts +++ b/packages/worker/src/api/controllers/global/roles.ts @@ -3,9 +3,9 @@ import { roles, context, cache, - users as usersCore, tenancy, } from "@budibase/backend-core" +import sdk from "../../../sdk" import { Ctx, App } from "@budibase/types" export async function fetch(ctx: Ctx) { @@ -48,7 +48,7 @@ export async function find(ctx: Ctx) { export async function removeAppRole(ctx: Ctx) { const { appId } = ctx.params const db = tenancy.getGlobalDB() - const users = await usersCore.db.allUsers() + const users = await sdk.users.db.allUsers() const bulk = [] const cacheInvalidations = [] for (let user of users) {