From 9eb092f8a7538038030f8fa8890fadd8ac18082d Mon Sep 17 00:00:00 2001 From: mambax7 Date: Sun, 27 Dec 2020 00:39:24 -0500 Subject: [PATCH] simplify return --- class/PermissionHandler.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/class/PermissionHandler.php b/class/PermissionHandler.php index 442c57ed..59b2fbcc 100644 --- a/class/PermissionHandler.php +++ b/class/PermissionHandler.php @@ -131,11 +131,7 @@ public function isGranted($gpermName, $id) return false; } $permissions = $this->getGrantedItems($gpermName); - if (!empty($permissions) && isset($permissions[$id])) { - return true; - } - - return false; + return !empty($permissions) && isset($permissions[$id]); } /**