Quick fixes based on raising PR, types and tests.

This commit is contained in:
mike12345567 2023-07-28 13:58:20 +01:00
parent 454f832b75
commit 1403bf26c6
4 changed files with 7 additions and 7 deletions

View File

@ -234,7 +234,7 @@
</div>
</div>
{#if enrichedApps.length}
{#if !enrichedApps.length}
<Layout noPadding gap="L">
<div class="title">
{#if $auth.user && sdk.users.isGlobalBuilder($auth.user)}

@ -1 +1 @@
Subproject commit 8e00c6f4bbd3c02de32872819d4a053dc7c0c058
Subproject commit ca41b937a80e38dc1ff4746b555cbb0e673a75ad

View File

@ -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
) {

View File

@ -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) {