Skip to content

Commit

Permalink
Merge pull request #489 from adfinis/fix-admins-redirect-to-'own'-end…
Browse files Browse the repository at this point in the history
…point

fix: admins and employees should redirect to `/list` endpoint
  • Loading branch information
MitanOmar authored Dec 12, 2024
2 parents 2862c9d + 4d63a1e commit a094753
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 a094753

Please sign in to comment.