Browse Source

fix: allow shared form in iframe

pull/7840/head
Pranav C 10 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
}
// allow for shared views
// allow for shared views based on page layout
if (to.meta?.layout === 'shared-view') {
return
}
// allow for shared views based on pageType meta prop
if (to.meta?.pageType === 'shared-view') {
return
}
// throw for all other pages
throw createError({ statusCode: 403, message: 'Not allowed' })
}

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

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

Loading…
Cancel
Save