Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix news related permission issues #15287

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion website/client/src/components/header/menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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'}"
>
Expand Down
2 changes: 1 addition & 1 deletion website/client/src/components/news/newsContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down
1 change: 0 additions & 1 deletion website/client/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ const router = new VueRouter({
meta: {
privilegeNeeded: [ // any one of these is enough to give access
'userSupport',
'newsPoster',
],
},
children: [
Expand Down
Loading