missing permission check in portal
This commit is contained in:
parent
46cd0ab732
commit
aa3e2e80b8
@ -14,12 +14,17 @@ class AddPortalItems
|
|||||||
*/
|
*/
|
||||||
public function handle(Event $event)
|
public function handle(Event $event)
|
||||||
{
|
{
|
||||||
|
$user = user();
|
||||||
$menu = $event->menu;
|
$menu = $event->menu;
|
||||||
|
|
||||||
$menu->route('portal.dashboard', trans_choice('general.dashboards', 1), [], 100, ['icon' => 'fa fa-tachometer-alt']);
|
$menu->route('portal.dashboard', trans_choice('general.dashboards', 1), [], 100, ['icon' => 'fa fa-tachometer-alt']);
|
||||||
|
|
||||||
$menu->route('portal.invoices.index', trans_choice('general.invoices', 2), [], 200, ['icon' => 'fa fa-file-signature']);
|
if ($user->can('read-portal-invoices')) {
|
||||||
|
$menu->route('portal.invoices.index', trans_choice('general.invoices', 2), [], 200, ['icon' => 'fa fa-file-signature']);
|
||||||
|
}
|
||||||
|
|
||||||
$menu->route('portal.payments.index', trans_choice('general.payments', 2), [], 300, ['icon' => 'fa fa-money-bill']);
|
if ($user->can('read-portal-payments')) {
|
||||||
|
$menu->route('portal.payments.index', trans_choice('general.payments', 2), [], 300, ['icon' => 'fa fa-money-bill']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user