|
|
@ -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' }) |
|
|
|
} |
|
|
|
} |
|
|
|