Skip to content

Commit

Permalink
Don't prevent address queries in schemas without user queries
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Sep 6, 2024
1 parent dc1ceae commit 94b14ce
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Fixed a PHP error that occurred when running PHP 8.2 or 8.3.
- Fixed a bug where disabled entries became enabled when edited within Live Preview. ([#15670](https://github.com/craftcms/cms/issues/15670))
- Fixed a bug where new nested entries could get incremented slugs even if there were no elements with conflicting URIs. ([#15672](https://github.com/craftcms/cms/issues/15672))
- Fixed a bug where Addresses fields weren’t always returning data in GraphQL.
- Fixed an information disclosure vulnerability.

## 5.4.1 - 2024-09-04
Expand Down
6 changes: 0 additions & 6 deletions src/gql/resolvers/elements/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
use craft\elements\Address as AddressElement;
use craft\elements\db\AddressQuery;
use craft\elements\db\ElementQuery;
use craft\elements\ElementCollection;
use craft\gql\base\ElementResolver;
use craft\helpers\Gql as GqlHelper;
use yii\base\UnknownMethodException;

/**
Expand Down Expand Up @@ -52,10 +50,6 @@ public static function prepareQuery(mixed $source, array $arguments, ?string $fi
}
}

if (!GqlHelper::canQueryUsers()) {
return ElementCollection::empty();
}

return $query;
}
}

0 comments on commit 94b14ce

Please sign in to comment.