From 60fcdb5de6120a30afa17d2d0231b4a54fa7027e Mon Sep 17 00:00:00 2001 From: DrumsnChocolate Date: Sun, 3 Nov 2024 21:16:28 +0100 Subject: [PATCH] I think this resolves the access errors --- app/routes/books.js | 4 ++++ app/routes/debit/collections.js | 4 ++++ app/routes/debit/mandates.js | 4 ++++ app/routes/debit/transactions.js | 4 ++++ app/routes/forum.js | 4 ++++ app/routes/forum/categories/category/index.js | 4 ++++ app/routes/forum/categories/category/threads/thread/index.js | 4 ++++ app/routes/groups.js | 4 ++++ app/routes/polls.js | 4 ++++ 9 files changed, 36 insertions(+) diff --git a/app/routes/books.js b/app/routes/books.js index ee68bcf6c..94d9b011f 100644 --- a/app/routes/books.js +++ b/app/routes/books.js @@ -4,4 +4,8 @@ export default class BooksRoute extends AuthenticatedRoute { queryParams = {}; breadcrumb = { title: 'Boeken' }; + + canAccess() { + return this.abilities.can('show books'); + } } diff --git a/app/routes/debit/collections.js b/app/routes/debit/collections.js index 15a3631f3..49ecdd9dc 100644 --- a/app/routes/debit/collections.js +++ b/app/routes/debit/collections.js @@ -4,4 +4,8 @@ export default class CollectionsRoute extends AuthenticatedRoute { queryParams = {}; breadcrumb = { title: "Incasso's" }; + + canAccess() { + return this.abilities.can('show debit/collections'); + } } diff --git a/app/routes/debit/mandates.js b/app/routes/debit/mandates.js index dd69b0d44..86f179735 100644 --- a/app/routes/debit/mandates.js +++ b/app/routes/debit/mandates.js @@ -4,4 +4,8 @@ export default class MandatesRoute extends AuthenticatedRoute { queryParams = {}; breadcrumb = { title: 'Incasso mandaten' }; + + canAccess() { + return this.abilities.can('show debit/mandates'); + } } diff --git a/app/routes/debit/transactions.js b/app/routes/debit/transactions.js index 9b29941dc..7f3d5b7c2 100644 --- a/app/routes/debit/transactions.js +++ b/app/routes/debit/transactions.js @@ -4,4 +4,8 @@ export default class TransactionsRoute extends AuthenticatedRoute { queryParams = {}; breadcrumb = { title: 'Transacties' }; + + canAccess() { + return this.abilities.can('show debit/transactions'); + } } diff --git a/app/routes/forum.js b/app/routes/forum.js index 567744680..d98136507 100644 --- a/app/routes/forum.js +++ b/app/routes/forum.js @@ -4,4 +4,8 @@ export default class ForumRoute extends AuthenticatedRoute { queryParams = {}; breadcrumb = { title: 'Forum' }; + + canAccess() { + return this.abilities.can('show forum/categories'); + } } diff --git a/app/routes/forum/categories/category/index.js b/app/routes/forum/categories/category/index.js index 554b67e35..700789f9e 100644 --- a/app/routes/forum/categories/category/index.js +++ b/app/routes/forum/categories/category/index.js @@ -4,4 +4,8 @@ export default class CategoryIndexRoute extends AuthenticatedRoute { beforeModel() { this.transitionTo('forum.categories.category.threads'); } + + canAccess() { + return this.abilities.can('show forum/categories'); + } } diff --git a/app/routes/forum/categories/category/threads/thread/index.js b/app/routes/forum/categories/category/threads/thread/index.js index c9bf8a5a5..593b1d8b2 100644 --- a/app/routes/forum/categories/category/threads/thread/index.js +++ b/app/routes/forum/categories/category/threads/thread/index.js @@ -4,4 +4,8 @@ export default class ThreadIndexRoute extends AuthenticatedRoute { beforeModel() { this.transitionTo('forum.categories.category.threads.thread.posts'); } + + canAccess() { + return this.abilities.can('show forum/threads'); + } } diff --git a/app/routes/groups.js b/app/routes/groups.js index 12a24e2a6..c426879cf 100644 --- a/app/routes/groups.js +++ b/app/routes/groups.js @@ -4,4 +4,8 @@ export default class GroupsRoute extends AuthenticatedRoute { queryParams = {}; breadcrumb = { title: 'Groepen' }; + + canAccess() { + return this.abilities.can('show groups'); + } } diff --git a/app/routes/polls.js b/app/routes/polls.js index 68205df06..7a40d0f76 100644 --- a/app/routes/polls.js +++ b/app/routes/polls.js @@ -4,4 +4,8 @@ export default class PollsRoute extends AuthenticatedRoute { queryParams = {}; breadcrumb = { title: 'Polls' }; + + canAccess() { + return this.abilities.can('show polls'); + } }