Expanded edit fields. Added revision history to scene and user pages.
This commit is contained in:
13
pages/admin/+onBeforeRender.js
Normal file
13
pages/admin/+onBeforeRender.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { render } from 'vike/abort'; /* eslint-disable-line import/extensions */
|
||||
|
||||
export function onBeforeRender(pageContext) {
|
||||
if (pageContext.user.role === 'user') {
|
||||
throw render(404);
|
||||
}
|
||||
|
||||
return {
|
||||
pageContext: {
|
||||
title: pageContext.routeParams.section,
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user