admin) { return true; } if (in_array($permission, $userContext->permissions)) { return true; } return false; } }