Skip to content

Commit d154770

Browse files
code reverted when merging 2.x (#874)
1 parent 72aecf5 commit d154770

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

modules/apigee_edge_teams/src/Entity/Form/TeamForm.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,11 @@ public function exists(string $name, array $element, FormStateInterface $form_st
224224
// Update the team name with predefined prefix.
225225
$name = $this->team_prefix . $form_state->getValue('name');
226226
}
227-
$query = $this->entityTypeManager->getStorage('team')->getQuery()->condition('name', $name);
227+
// Only member with access can check if team exists.
228+
$query = $this->entityTypeManager->getStorage('team')
229+
->getQuery()
230+
->accessCheck(TRUE)
231+
->condition('name', $name);
228232

229233
return (bool) $query->count()->execute();
230234
}

0 commit comments

Comments
 (0)