Skip to content
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
2 changes: 1 addition & 1 deletion .phpunit.cache/test-results

Large diffs are not rendered by default.

13 changes: 10 additions & 3 deletions lib/Service/GraphQL/SchemaGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,20 @@ public function generate(): Schema
$this->initScalars();
$this->initHandlers();

// Load all registers and schemas.
$registers = $this->registerMapper->findAll();
// Load all registers and schemas. Bypass RBAC + multi-tenancy for
// type generation: the GraphQL schema is system-scoped (per-request,
// APCu-cached), and per-user authorisation happens at resolve time
// on each query. Filtering schemas by the caller's organisation here
// produces a different GraphQL schema per org, which silently hides
// every cross-org schema from the type system even though those
// schemas are readable via REST under the same session. Same
// rationale as PermissionHandler::resolveSchemaSlug (#1454).
$registers = $this->registerMapper->findAll(_rbac: false, _multitenancy: false);
foreach ($registers as $register) {
$this->registersById[$register->getId()] = $register;
}

$schemas = $this->schemaMapper->findAll();
$schemas = $this->schemaMapper->findAll(_rbac: false, _multitenancy: false);
foreach ($schemas as $schema) {
$this->schemasById[$schema->getId()] = $schema;
}
Expand Down
Loading