From 4b4f7fdedb061ce595e7134050da03a1db0f6532 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 6 Feb 2017 12:54:18 +0200 Subject: [PATCH] Merge fix for account gateway settings permission issue --- app/Models/EntityModel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/EntityModel.php b/app/Models/EntityModel.php index 05cf083bc..618987b8c 100644 --- a/app/Models/EntityModel.php +++ b/app/Models/EntityModel.php @@ -154,7 +154,7 @@ class EntityModel extends Eloquent } } - if (Auth::check() && ! Auth::user()->hasPermission('view_all') && $this->getEntityType() != ENTITY_TAX_RATE) { + if (Auth::check() && ! Auth::user()->hasPermission('view_all') && method_exists($this, 'getEntityType') && $this->getEntityType() != ENTITY_TAX_RATE) { $query->where(Utils::pluralizeEntityType($this->getEntityType()) . '.user_id', '=', Auth::user()->id); }