Skip to content

Commit

Permalink
Update actions to show for all SPAs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Haube committed Jan 2, 2024
1 parent 21a821f commit e02c28c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ export const getAvailableActions = (
result: OsMainSourceItem
) => {
const checks = PackageCheck(result);
return checks.planTypeIs([PlanType.MED_SPA])
// We are only authorizing actions for SPAs at this point in time. Once waivers are added,
// this return should be non-conditional and rely on the `r.check()` to authorize
// plan types as needed.
return checks.isSpa
? rules.filter((r) => r.check(checks, user)).map((r) => r.action)
: [];
};

0 comments on commit e02c28c

Please sign in to comment.