Browse Source

Merge pull request #7840 from nocodb/nc-fix/7828-shared-form-in-iframe

fix: allow shared form in iframe
pull/6831/head
Ramesh Mane 8 months ago committed by GitHub
parent
commit
dd78f87c30
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  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