1
0
Fork 0
mirror of synced 2024-06-29 11:31:06 +12:00

Merge branch 'dev-experience' of github.com:Budibase/budibase into dev-experience

This commit is contained in:
Andrew Kingston 2021-04-07 11:31:26 +01:00
commit 62a5c1697d
2 changed files with 2 additions and 6 deletions

View file

@ -14,7 +14,7 @@ describe("/component", () => {
describe("fetch definitions", () => {
it("should be able to fetch definitions", async () => {
const res = await request
.get(`/${config.getAppId()}/components/definitions`)
.get(`/api/${config.getAppId()}/components/definitions`)
.set(config.defaultHeaders())
.expect("Content-Type", /json/)
.expect(200)
@ -25,7 +25,7 @@ describe("/component", () => {
await checkBuilderEndpoint({
config,
method: "GET",
url: `/${config.getAppId()}/components/definitions`,
url: `/api/${config.getAppId()}/components/definitions`,
})
})
})

View file

@ -42,10 +42,6 @@ module.exports = (permType, permLevel = null) => async (ctx, next) => {
const isAdmin = ADMIN_ROLES.includes(role._id)
const isAuthed = ctx.auth.authenticated
if (permType === PermissionTypes.BUILDER) {
return next()
}
const { basePermissions, permissions } = await getUserPermissions(
ctx.appId,
role._id