mirror of
https://github.com/requarks/wiki.git
synced 2026-10-12 05:54:49 -05:00
fix: missing permissions on new page for scripts and tags
This commit is contained in:
4 files changed
+18
-3
No files matched your search
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div
|
||||
class="w-toolbar-title min-w-0 grow overflow-hidden pl-3 text-lg leading-6 text-ellipsis whitespace-nowrap">
|
||||
class="w-toolbar-title min-w-0 grow overflow-hidden pl-3 text-h6 text-ellipsis whitespace-nowrap">
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<w-btn dense flat to="/">
|
||||
<w-avatar size="34px" square><img src="/_assets/logo-wikijs.svg" /></w-avatar>
|
||||
</w-btn>
|
||||
<w-toolbar-title class="text-h6">Wiki.js</w-toolbar-title>
|
||||
<w-toolbar-title>Wiki.js</w-toolbar-title>
|
||||
</w-toolbar>
|
||||
<w-toolbar class="max-md:hidden justify-center" style="height: 64px">
|
||||
<div class="text-overline uppercase text-grey">{{ t('admin.adminArea') }}</div>
|
||||
|
||||
@@ -373,7 +373,7 @@
|
||||
:src="`/_site/` + adminStore.currentSiteId + `/logo?` + state.assetTimestamp"
|
||||
style="height: 34px" />
|
||||
</w-btn>
|
||||
<w-toolbar-title class="text-h6" v-if="state.config.logoText">{{
|
||||
<w-toolbar-title v-if="state.config.logoText">{{
|
||||
state.config.title
|
||||
}}</w-toolbar-title>
|
||||
</w-toolbar>
|
||||
|
||||
@@ -634,6 +634,21 @@ export const usePageStore = defineStore('page', {
|
||||
storedProps: { title: '', description: '', icon: '' },
|
||||
mode: 'edit'
|
||||
})
|
||||
|
||||
/*
|
||||
-> Page permissions at the path the new page will sit at
|
||||
|
||||
Everywhere else they arrive with the page itself (`pageLoad`), and a page being created has
|
||||
no page to carry them -- while `/_create` is not a page path, so the guard in `App.vue` has
|
||||
just dropped whatever the page being left granted. Left empty, the properties panel hid every
|
||||
section that is gated on one -- Scripts, Styles, Tags -- until the page had been saved once.
|
||||
|
||||
Asked of the new path and not of the page the author started from, since a rule is granted
|
||||
per path: starting a page in a section they may write scripts in is what decides it.
|
||||
*/
|
||||
if (newPath) {
|
||||
await useUserStore().fetchPagePermissions(newPath, this.locale)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* PAGE - DUPLICATE
|
||||
|
||||
Reference in new issue
Block a user