Fix news related permission issues (#15287)

This commit is contained in:
Phillip Thelen
2025-02-11 19:04:00 +01:00
committed by GitHub
parent 35ebb12bf2
commit 72a753626f
3 changed files with 2 additions and 3 deletions

View File

@@ -297,7 +297,7 @@
<div class="topbar-dropdown">
<router-link
v-if="user.permissions.fullAccess ||
user.permissions.userSupport || user.permissions.newsPoster"
user.permissions.userSupport"
class="topbar-dropdown-item dropdown-item"
:to="{name: 'adminPanel'}"
>

View File

@@ -107,7 +107,7 @@ export default {
if (lastPublishedPost) this.posts.push(lastPublishedPost);
// If the user is authorized, show any draft
if (this.user && this.user.contributor.newsPoster) {
if (this.user && (this.user.permissions.news || this.user.permissions.fullAccess)) {
this.posts.unshift(
...postsFromServer
.filter(p => !p.published || moment().isBefore(p.publishDate)),

View File

@@ -190,7 +190,6 @@ const router = new VueRouter({
meta: {
privilegeNeeded: [ // any one of these is enough to give access
'userSupport',
'newsPoster',
],
},
children: [