Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for deprecation:Relying on entity queries to check access by default #728

Merged
merged 1 commit into from
Jul 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apigee_edge.install
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function apigee_edge_requirements($phase) {
if (!InstallerKernel::installationAttempted()) {
$missing_mails = \Drupal::entityQuery('user')
->notExists('mail')
->accessCheck(TRUE)
->condition('uid', '0', '<>')
->execute();
if (!empty($missing_mails)) {
Expand Down
2 changes: 1 addition & 1 deletion apigee_edge.module
Original file line number Diff line number Diff line change
Expand Up @@ -1670,7 +1670,7 @@ function apigee_edge_developer_app_storage_load(array $entities) {
// anyway but one by one. With this we warm up the user entity cache and
// User::load() will return all users from cache.
$userStorage = \Drupal::entityTypeManager()->getStorage('user');
$uids = $userStorage->getQuery()->condition('mail', $dev_id_mail_map, 'IN')->execute();
$uids = $userStorage->getQuery()->accessCheck(TRUE)->condition('mail', $dev_id_mail_map, 'IN')->execute();
$users = $userStorage->loadMultiple($uids);

if ($dev_id_mail_map) {
Expand Down