Only show promo to admins

This commit is contained in:
Hillel Coren 2017-01-09 10:19:10 +02:00
parent fba3a9c3d5
commit 2f275a846d

View File

@ -43,7 +43,8 @@ class DashboardController extends BaseController
$expenses = $dashboardRepo->expenses($accountId, $userId, $viewAll); $expenses = $dashboardRepo->expenses($accountId, $userId, $viewAll);
$tasks = $dashboardRepo->tasks($accountId, $userId, $viewAll); $tasks = $dashboardRepo->tasks($accountId, $userId, $viewAll);
$showBlueVinePromo = env('BLUEVINE_PARTNER_UNIQUE_ID') $showBlueVinePromo = $user->is_admin
&& env('BLUEVINE_PARTNER_UNIQUE_ID')
&& ! $account->company->bluevine_status && ! $account->company->bluevine_status
&& $account->created_at <= date( 'Y-m-d', strtotime( '-1 month' )); && $account->created_at <= date( 'Y-m-d', strtotime( '-1 month' ));