diff --git a/Civi/Eck/Permissions.php b/Civi/Eck/Permissions.php index cda90ef..de54935 100644 --- a/Civi/Eck/Permissions.php +++ b/Civi/Eck/Permissions.php @@ -103,7 +103,7 @@ public static function getTypePermissionName(string $op, string $type): string { if (!in_array($op, [self::ACTION_VIEW, self::ACTION_EDIT, self::ACTION_DELETE], TRUE)) { throw new \CRM_Core_Exception("Invalid operation for ECK entity type-specific permission: {$op}."); } - if (NULL !== \CRM_Eck_BAO_EckEntityType::getEntityType($type)) { + if (NULL === \CRM_Eck_BAO_EckEntityType::getEntityType($type)) { throw new \CRM_Core_Exception("Invalid ECK entity type name for type-specific permission: {$type}."); } return "{$op} eck entity {$type}";