From 1efa715905c3a6268335ebcf8274d67d2742de2f Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 9 Jan 2017 10:20:19 +0200 Subject: [PATCH] Only show promo to admins --- app/Http/Controllers/DashboardController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php index fcbc08a00c1e..764d78111517 100644 --- a/app/Http/Controllers/DashboardController.php +++ b/app/Http/Controllers/DashboardController.php @@ -43,8 +43,9 @@ class DashboardController extends BaseController $expenses = $dashboardRepo->expenses($accountId, $userId, $viewAll); $tasks = $dashboardRepo->tasks($accountId, $userId, $viewAll); - $showBlueVinePromo = ! $user->primaryAccount()->bluevine_status + $showBlueVinePromo = $user->is_admin && env('BLUEVINE_PARTNER_UNIQUE_ID') + && ! $account->company->bluevine_status && $account->created_at <= date( 'Y-m-d', strtotime( '-1 month' )); // check if the account has quotes