From 4d63a1eb275e9c9c427478893a8aaed6f9c5df97 Mon Sep 17 00:00:00 2001 From: Mitan Omar Date: Thu, 12 Dec 2024 14:44:56 +0100 Subject: [PATCH] fix: admins and employees should redirect to `/list` endpoint --- frontend/app/subscriptions/index/route.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/frontend/app/subscriptions/index/route.js b/frontend/app/subscriptions/index/route.js index 681dfc1f..a2d1db88 100644 --- a/frontend/app/subscriptions/index/route.js +++ b/frontend/app/subscriptions/index/route.js @@ -13,10 +13,15 @@ export default class SubscriptionsIndexRoute extends Route { * Only admins get the full list while customers/users * get a simple overview over their own projects. */ - if (this.account.isInGroup(ENV.auth.customerRole)) { - this.transitionTo("subscriptions.own"); - } else { + if ( + this.account.isInGroups("one", [ + ENV.auth.employeeRole, + ENV.auth.adminRole, + ]) + ) { this.transitionTo("subscriptions.list"); + } else { + this.transitionTo("subscriptions.own"); } } }