Skip to content

Commit

Permalink
fix: admins and employees should redirect to /list endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
MitanOmar committed Dec 12, 2024
1 parent 2862c9d commit 4d63a1e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions frontend/app/subscriptions/index/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
}

0 comments on commit 4d63a1e

Please sign in to comment.