From bfe4bc6ee5b89a5004a59fac5c7924e9b66f64ac Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 13 Jun 2016 11:40:22 -0700 Subject: [PATCH] Bypass company scoping if user is an admin --- app/Models/Company.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Company.php b/app/Models/Company.php index 740008d3c1..3625fbf5fd 100644 --- a/app/Models/Company.php +++ b/app/Models/Company.php @@ -129,7 +129,7 @@ final class Company extends Model public static function scopeCompanyables($query, $column = 'company_id') { - if (!static::isFullMultipleCompanySupportEnabled()) { + if (!static::isFullMultipleCompanySupportEnabled() || Auth::user()->isSuperUser()) { return $query; } else { return static::scopeCompanyablesDirectly($query, $column);