Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ebc2a24
feat(rbac): backfill publication+document read-rule two-rule shape (W…
WilcoLouwerse Aug 25, 2026
02d2f0d
feat(search): refactor assemblePublicSearchResults per WOO-536 (Fase 5)
WilcoLouwerse Aug 27, 2026
bb21d16
fix(search): address review #5041094649 findings (WOO-536)
WilcoLouwerse Aug 27, 2026
9d4449c
chore(openspec): sync + archive fix-fts-catalog-model-alignment (WOO-…
WilcoLouwerse Aug 28, 2026
9b41d66
Merge branch 'main' into hotfix/woo-536-fts-catalog-model
WilcoLouwerse Aug 31, 2026
3d3aa37
fix(search): resolve document→publication via document's own _relatio…
WilcoLouwerse Aug 31, 2026
b6dc3f8
test(search): rewrite PublicationQueryServiceTest for Fase-5 (WOO-536)
WilcoLouwerse Aug 31, 2026
c471e48
test(smoke): add smoke-fts-woo536.sh acceptance-criteria script
WilcoLouwerse Aug 31, 2026
7ed145e
chore(gates): satisfy hydra gate-16 + gate-66 (WOO-536)
WilcoLouwerse Aug 31, 2026
f476bbd
fix(search): rebuild `total` from emitted rows (WOO-536)
WilcoLouwerse Aug 31, 2026
c0595ba
fix(search): address self-review D1-D6 findings (WOO-536)
WilcoLouwerse Aug 31, 2026
b4939ff
fix(search): preserve pagination signal in envelope total (WOO-536)
WilcoLouwerse Sep 1, 2026
45a4c53
fix(quality): resolve PR-introduced PHP quality failures (WOO-536)
WilcoLouwerse Sep 1, 2026
638f8c8
fix(routes): return 404 (not 500) for mixed-case catalog slugs (WOO-536)
WilcoLouwerse Sep 1, 2026
7be7ccb
fix(search): isObjectPublic reads English field names (WOO-536)
WilcoLouwerse Sep 1, 2026
d44ec07
fix(quality): phpcs errors in is_string normaliser (WOO-536)
WilcoLouwerse Sep 1, 2026
5c42d19
Merge pull request #1154 from ConductionNL/hotfix/woo-536-fts-catalog…
WilcoLouwerse Sep 1, 2026
5c25837
chore(controllers): migrate annotation-style @PublicPage/@NoCSRFRequi…
WilcoLouwerse Sep 1, 2026
f29ccd1
fix(review): update stale @PublicPage prose comments to #[PublicPage]…
WilcoLouwerse Sep 1, 2026
0684a9a
Merge pull request #1350 from ConductionNL/hotfix/woo-550-annotation-…
WilcoLouwerse Sep 1, 2026
1e93e0f
fix(search): drop removed `_rbacAsPublic` named arg from OR calls (WO…
WilcoLouwerse Sep 1, 2026
eaab513
chore(release): 2.0.13 (#1355)
github-actions[bot] Sep 1, 2026
f7f32cf
chore(release): sync main back into development
github-actions[bot] Sep 1, 2026
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
80 changes: 40 additions & 40 deletions appinfo/routes.php

Large diffs are not rendered by default.

39 changes: 18 additions & 21 deletions lib/Controller/PublicationsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
use OCP\AppFramework\Controller;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Http\Attribute\AnonRateLimit;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
use OCP\AppFramework\Http\Attribute\PublicPage;
use OCP\AppFramework\Http\DataDownloadResponse;
use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Http\Response;
Expand Down Expand Up @@ -391,11 +393,10 @@ private function objectMatchesCatalogScope(object $object, array $allowedRegiste
*
* @return Response The CORS response
*
* @NoCSRFRequired
* @PublicPage
*
* @spec openspec/specs/cross-origin-api-access/spec.md#requirement-answer-cors-preflight-requests-on-public-api-controllers-cor-001
*/
#[PublicPage]
#[NoCSRFRequired]
#[AnonRateLimit(limit: 240, period: 60)]
public function preflightedCors(): Response {
// Determine the origin via the same allowlist-aware resolver used elsewhere
Expand All @@ -420,15 +421,14 @@ public function preflightedCors(): Response {
*
* @return JSONResponse JSON response containing publications, pagination info, and optionally facets
*
* @NoCSRFRequired
* @PublicPage
*
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.NPathComplexity)
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*
* @spec openspec/specs/publications/spec.md
*/
#[PublicPage]
#[NoCSRFRequired]
#[AnonRateLimit(limit: 120, period: 60)]
public function index(string $catalogSlug): JSONResponse {
try {
Expand Down Expand Up @@ -552,15 +552,14 @@ public function index(string $catalogSlug): JSONResponse {
* @return JSONResponse JSON response containing the requested publication
* @throws ContainerExceptionInterface|NotFoundExceptionInterface
*
* @NoCSRFRequired
* @PublicPage
*
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.NPathComplexity)
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*
* @spec openspec/specs/publications/spec.md
*/
#[PublicPage]
#[NoCSRFRequired]
#[AnonRateLimit(limit: 120, period: 60)]
public function show(string $catalogSlug, string $id): JSONResponse {
try {
Expand Down Expand Up @@ -840,11 +839,10 @@ public function show(string $catalogSlug, string $id): JSONResponse {
* @return JSONResponse JSON response containing the requested attachments/files.
* @throws ContainerExceptionInterface|NotFoundExceptionInterface
*
* @NoCSRFRequired
* @PublicPage
*
* @spec openspec/specs/publications/spec.md
*/
#[PublicPage]
#[NoCSRFRequired]
#[AnonRateLimit(limit: 120, period: 60)]
public function attachments(string $catalogSlug, string $id): JSONResponse {

Expand Down Expand Up @@ -927,11 +925,10 @@ public function attachments(string $catalogSlug, string $id): JSONResponse {
* @return DataDownloadResponse|JSONResponse JSON response containing the requested attachments/files.
* @throws ContainerExceptionInterface|NotFoundExceptionInterface
*
* @NoCSRFRequired
* @PublicPage
*
* @spec openspec/specs/publications/spec.md
*/
#[PublicPage]
#[NoCSRFRequired]
#[AnonRateLimit(limit: 60, period: 60)]
public function download(string $catalogSlug, string $id): DataDownloadResponse|JSONResponse {
try {
Expand Down Expand Up @@ -1023,12 +1020,12 @@ public function download(string $catalogSlug, string $id): DataDownloadResponse|
* @return JSONResponse A JSON response containing the related objects
* @throws ContainerExceptionInterface|NotFoundExceptionInterface
*
* @NoCSRFRequired
* @PublicPage
* @SuppressWarnings(PHPMD.UnusedFormalParameter) catalogSlug required by route pattern.
*
* @spec openspec/specs/publications/spec.md
*/
#[PublicPage]
#[NoCSRFRequired]
#[AnonRateLimit(limit: 120, period: 60)]
public function uses(string $catalogSlug, string $id): JSONResponse {
try {
Expand All @@ -1041,7 +1038,7 @@ public function uses(string $catalogSlug, string $id): JSONResponse {
//
// Failing to place the object inside the catalog is a refusal, not a reason to
// continue unscoped (#857): find() below with no register and no schema falls
// back to OpenRegister's every-magic-table path, and this route is @PublicPage.
// back to OpenRegister's every-magic-table path, and this route is #[PublicPage].
// A catalog with no configured scope has no namespace to serve from, which is
// the same C-1 policy attachments() and download() have carried since wave-7.
$catalog = $this->catalogiService->getCatalogBySlug($catalogSlug);
Expand Down Expand Up @@ -1128,12 +1125,12 @@ public function uses(string $catalogSlug, string $id): JSONResponse {
* @return JSONResponse A JSON response containing the referenced objects
* @throws ContainerExceptionInterface|NotFoundExceptionInterface
*
* @NoCSRFRequired
* @PublicPage
* @SuppressWarnings(PHPMD.UnusedFormalParameter) catalogSlug required by route pattern.
*
* @spec openspec/specs/publications/spec.md
*/
#[PublicPage]
#[NoCSRFRequired]
#[AnonRateLimit(limit: 120, period: 60)]
public function used(string $catalogSlug, string $id): JSONResponse {
try {
Expand All @@ -1146,7 +1143,7 @@ public function used(string $catalogSlug, string $id): JSONResponse {
//
// Failing to place the object inside the catalog is a refusal, not a reason to
// continue unscoped (#857): find() below with no register and no schema falls
// back to OpenRegister's every-magic-table path, and this route is @PublicPage.
// back to OpenRegister's every-magic-table path, and this route is #[PublicPage].
// A catalog with no configured scope has no namespace to serve from, which is
// the same C-1 policy attachments() and download() have carried since wave-7.
$catalog = $this->catalogiService->getCatalogBySlug($catalogSlug);
Expand Down
35 changes: 16 additions & 19 deletions lib/Controller/SearchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\AnonRateLimit;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
use OCP\AppFramework\Http\Attribute\PublicPage;
use OCP\AppFramework\Http\DataDownloadResponse;
use OCP\AppFramework\Http\JSONResponse;
use OCP\IL10N;
Expand All @@ -54,7 +57,7 @@
*
* The remaining methods on this controller are internal/admin-use only
* (testing + administrative introspection); they retain their original
* `@NoAdminRequired` posture and do not participate in the public surface.
* `#[NoAdminRequired]` posture and do not participate in the public surface.
*
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
Expand Down Expand Up @@ -129,12 +132,11 @@ private function getObjectService(): object {
*
* @return JSONResponse JSON response containing the mixed publication/document result envelope.
*
* @PublicPage
* @NoCSRFRequired
*
* @spec openspec/changes/add-public-fulltext-search/tasks.md#task-3
* @spec openspec/changes/add-document-content-search/tasks.md#task-3
*/
#[PublicPage]
#[NoCSRFRequired]
#[AnonRateLimit(limit: 60, period: 60)]
public function index(): JSONResponse {
try {
Expand Down Expand Up @@ -188,11 +190,10 @@ public function index(): JSONResponse {
*
* @throws ContainerExceptionInterface|NotFoundExceptionInterface
*
* @NoAdminRequired
* @NoCSRFRequired
*
* @spec openspec/specs/federation/spec.md#requirement-retrieve-a-single-publication-by-id-from-local-or-federated-sources-fed-002
*/
#[NoAdminRequired]
#[NoCSRFRequired]
public function show(string $id): JSONResponse {
if ($this->userSession->getUser() === null) {
return new JSONResponse(data: ['message' => $this->l10n->t('Not logged in')], statusCode: Http::STATUS_UNAUTHORIZED);
Expand All @@ -212,11 +213,10 @@ public function show(string $id): JSONResponse {
*
* @throws ContainerExceptionInterface|NotFoundExceptionInterface
*
* @NoAdminRequired
* @NoCSRFRequired
*
* @spec openspec/specs/federation/spec.md#requirement-retrieve-publication-attachments-from-local-or-federated-sources-fed-005
*/
#[NoAdminRequired]
#[NoCSRFRequired]
public function attachments(string $id): JSONResponse {
if ($this->userSession->getUser() === null) {
return new JSONResponse(data: ['message' => $this->l10n->t('Not logged in')], statusCode: Http::STATUS_UNAUTHORIZED);
Expand All @@ -236,11 +236,10 @@ public function attachments(string $id): JSONResponse {
*
* @throws ContainerExceptionInterface|NotFoundExceptionInterface
*
* @NoAdminRequired
* @NoCSRFRequired
*
* @spec openspec/specs/federation/spec.md#requirement-download-publication-files-from-local-or-federated-sources-fed-006
*/
#[NoAdminRequired]
#[NoCSRFRequired]
public function download(string $id): DataDownloadResponse|JSONResponse {
if ($this->userSession->getUser() === null) {
return new JSONResponse(data: ['message' => $this->l10n->t('Not logged in')], statusCode: Http::STATUS_UNAUTHORIZED);
Expand All @@ -261,11 +260,10 @@ public function download(string $id): DataDownloadResponse|JSONResponse {
*
* @throws ContainerExceptionInterface|NotFoundExceptionInterface
*
* @NoAdminRequired
* @NoCSRFRequired
*
* @spec openspec/specs/federation/spec.md#requirement-retrieve-outgoing-relations-uses-with-federation-support-fed-003
*/
#[NoAdminRequired]
#[NoCSRFRequired]
public function uses(string $id): JSONResponse {
if ($this->userSession->getUser() === null) {
return new JSONResponse(data: ['message' => $this->l10n->t('Not logged in')], statusCode: Http::STATUS_UNAUTHORIZED);
Expand All @@ -286,11 +284,10 @@ public function uses(string $id): JSONResponse {
*
* @throws ContainerExceptionInterface|NotFoundExceptionInterface
*
* @NoAdminRequired
* @NoCSRFRequired
*
* @spec openspec/specs/federation/spec.md#requirement-retrieve-incoming-relations-used-by-with-federation-support-fed-004
*/
#[NoAdminRequired]
#[NoCSRFRequired]
public function used(string $id): JSONResponse {
if ($this->userSession->getUser() === null) {
return new JSONResponse(data: ['message' => $this->l10n->t('Not logged in')], statusCode: Http::STATUS_UNAUTHORIZED);
Expand Down
Loading