Quick fixes based on raising PR, types and tests.
This commit is contained in:
parent
454f832b75
commit
1403bf26c6
|
@ -234,7 +234,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if enrichedApps.length}
|
{#if !enrichedApps.length}
|
||||||
<Layout noPadding gap="L">
|
<Layout noPadding gap="L">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
{#if $auth.user && sdk.users.isGlobalBuilder($auth.user)}
|
{#if $auth.user && sdk.users.isGlobalBuilder($auth.user)}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 8e00c6f4bbd3c02de32872819d4a053dc7c0c058
|
Subproject commit ca41b937a80e38dc1ff4746b555cbb0e673a75ad
|
|
@ -7,14 +7,14 @@ import userEndpoints from "./users"
|
||||||
import authorized from "../../../middleware/authorized"
|
import authorized from "../../../middleware/authorized"
|
||||||
import publicApi from "../../../middleware/publicApi"
|
import publicApi from "../../../middleware/publicApi"
|
||||||
import { paramResource, paramSubResource } from "../../../middleware/resourceId"
|
import { paramResource, paramSubResource } from "../../../middleware/resourceId"
|
||||||
|
import { PermissionType, PermissionLevel } from "@budibase/types"
|
||||||
import { CtxFn } from "./utils/Endpoint"
|
import { CtxFn } from "./utils/Endpoint"
|
||||||
import mapperMiddleware from "./middleware/mapper"
|
import mapperMiddleware from "./middleware/mapper"
|
||||||
import env from "../../../environment"
|
import env from "../../../environment"
|
||||||
// below imports don't have declaration files
|
// below imports don't have declaration files
|
||||||
const Router = require("@koa/router")
|
const Router = require("@koa/router")
|
||||||
const { RateLimit, Stores } = require("koa2-ratelimit")
|
const { RateLimit, Stores } = require("koa2-ratelimit")
|
||||||
import { middleware, redis, permissions } from "@budibase/backend-core"
|
import { middleware, redis } from "@budibase/backend-core"
|
||||||
const { PermissionType, PermissionLevel } = permissions
|
|
||||||
|
|
||||||
const PREFIX = "/api/public/v1"
|
const PREFIX = "/api/public/v1"
|
||||||
// allow a lot more requests when in test
|
// allow a lot more requests when in test
|
||||||
|
@ -111,7 +111,7 @@ function applyAdminRoutes(endpoints: any) {
|
||||||
|
|
||||||
function applyRoutes(
|
function applyRoutes(
|
||||||
endpoints: any,
|
endpoints: any,
|
||||||
permType: string,
|
permType: PermissionType,
|
||||||
resource: string,
|
resource: string,
|
||||||
subResource?: string
|
subResource?: string
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -3,9 +3,9 @@ import {
|
||||||
roles,
|
roles,
|
||||||
context,
|
context,
|
||||||
cache,
|
cache,
|
||||||
users as usersCore,
|
|
||||||
tenancy,
|
tenancy,
|
||||||
} from "@budibase/backend-core"
|
} from "@budibase/backend-core"
|
||||||
|
import sdk from "../../../sdk"
|
||||||
import { Ctx, App } from "@budibase/types"
|
import { Ctx, App } from "@budibase/types"
|
||||||
|
|
||||||
export async function fetch(ctx: Ctx) {
|
export async function fetch(ctx: Ctx) {
|
||||||
|
@ -48,7 +48,7 @@ export async function find(ctx: Ctx) {
|
||||||
export async function removeAppRole(ctx: Ctx) {
|
export async function removeAppRole(ctx: Ctx) {
|
||||||
const { appId } = ctx.params
|
const { appId } = ctx.params
|
||||||
const db = tenancy.getGlobalDB()
|
const db = tenancy.getGlobalDB()
|
||||||
const users = await usersCore.db.allUsers()
|
const users = await sdk.users.db.allUsers()
|
||||||
const bulk = []
|
const bulk = []
|
||||||
const cacheInvalidations = []
|
const cacheInvalidations = []
|
||||||
for (let user of users) {
|
for (let user of users) {
|
||||||
|
|
Loading…
Reference in New Issue