Browse Source

fix: allow shared form in iframe

pull/7840/head
Pranav C 9 months ago
parent
commit
1a9ee6fa33
  1. 7
      packages/nc-gui/middleware/01.security.global.ts
  2. 1
      packages/nc-gui/pages/index/[typeOrId]/form/[viewId].vue

7
packages/nc-gui/middleware/01.security.global.ts

@ -6,11 +6,16 @@ export default defineNuxtRouteMiddleware(async (to) => {
return return
} }
// allow for shared views // allow for shared views based on page layout
if (to.meta?.layout === 'shared-view') { if (to.meta?.layout === 'shared-view') {
return return
} }
// allow for shared views based on pageType meta prop
if (to.meta?.pageType === 'shared-view') {
return
}
// throw for all other pages // throw for all other pages
throw createError({ statusCode: 403, message: 'Not allowed' }) throw createError({ statusCode: 403, message: 'Not allowed' })
} }

1
packages/nc-gui/pages/index/[typeOrId]/form/[viewId].vue

@ -22,6 +22,7 @@ import {
definePageMeta({ definePageMeta({
public: true, public: true,
pageType: 'shared-view',
}) })
useSidebar('nc-left-sidebar', { hasSidebar: false }) useSidebar('nc-left-sidebar', { hasSidebar: false })

Loading…
Cancel
Save