Skip to content
This repository has been archived by the owner on Sep 5, 2019. It is now read-only.

Commit

Permalink
Merge pull request #2 from kendugu/master
Browse files Browse the repository at this point in the history
Filter list of available authorized dashboards
  • Loading branch information
alexbowers authored Sep 5, 2018
2 parents 1c8e3cb + 1505c84 commit e824cf6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/DashboardNova.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ public static function copyDefaultDashboardCards()
*/
public static function availableDashboards(Request $request)
{
return collect(static::$dashboards)->all();
return collect(static::$dashboards)
->filter
->authorize($request)
->all();
}

/**
Expand Down

0 comments on commit e824cf6

Please sign in to comment.