query changed

This commit is contained in:
HolgerHatGarKeineNode
2023-02-11 15:57:36 +01:00
parent aef833c2b9
commit 3cad478856

View File

@@ -38,11 +38,7 @@ class ArticleOverview extends Component
if (auth()->user() && auth() if (auth()->user() && auth()
->user() ->user()
->hasRole('news-editor')) { ->hasRole('news-editor')) {
} else {
}
if (auth()->user() && !auth()
->user()
->hasRole('news-editor')) {
$query $query
->whereHas('createdBy.roles', ->whereHas('createdBy.roles',
fn($query) => $query->where('roles.name', 'news-editor')) fn($query) => $query->where('roles.name', 'news-editor'))