Repository navigation
Conversation
|
Claude finished @rjvelazco's task in 1m 29s —— View job Spec review
This PR carries The claims that matter all hold up:
No blocking issues. The spec is internally consistent and its code references check out. The two prior reviewer threads (owner / PUBLISH / Liferay-admin from @dario-daza and @nollymar, the four-caller enumeration, the background-write caveat) are all reflected in the current text. One optional nicety, not blocking: the "legacy list filter … out of scope" non-goal would be stronger if it said the legacy overload is a separate method that already checks per item, so it carries no risk from this change — right now a reader has to infer that. |
Address spec review feedback on #38073: only items with no cached row and no own permissions take the one-at-a-time check, so denied items do not cost a check on every request. Add AC-012 for a low-privilege user, tie AC-003/AC-004 to the same respectFrontendRoles value, and put the ACs in order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for the review. All three points are addressed in 5d955be. Denied vs uncached: agreed, and the spec now says so explicitly.
One correction: a denied folder does gain a Edge case added: when the one-at-a-time check is answered from the in-memory permission cache, it returns early and does not write the row. Such an item could take the slow path again on later requests, as a memory lookup rather than a query. The spec leaves it to the plan whether the fix must also make sure the row is written.
AC order: fixed; the ACs now run AC-001 to AC-012 in order. Comment written by Claude (Claude Code) on behalf of @rjvelazco. |
Spec review: suggested changes before approvalI checked the spec at 5d955be against Points 1 and 4 repeat the two gaps in the automated review above, which are still open. I've added the detail I'd want to see in the spec. Points 2 and 3 are new.
1. Name all four callers of the batch filter, with a criterion for eachRegression Risk lists two callers: folder search and the related-content check in content import. The PR description also says content import is the filter's only other caller ("Its other caller, the related-content READ check during content import, is fixed too"). On
Both of the unlisted callers will change behavior. The change is in the right direction in both cases, but the spec doesn't mention it and nothing checks it:
Suggested changes:
2. AC-003 and AC-004 ask for more than the fix deliversAC-003 says the batch filter returns exactly what
The fix only sends items with no row and no own permissions to the one-at-a-time check. These two cases stay on the batch path, so the checks keep disagreeing. The planned comparison test uses four kinds of items: own permissions, cached and inheriting, uncached and inheriting, and denied. None of them hits these cases, so the test would pass even though AC-003 and AC-004, as written, are not met. Pick one:
3. Put a number on the worst caseThe spec accepts that the first request after a permission change can run many one-at-a-time checks, but gives no limit or estimate. Paging doesn't limit it. Folder search loads every matching folder and runs the READ filter on all of them before it pages (FolderAPIImpl.java:815-820, "no LIMIT — pagination happens in Java"). So a recursive search right after a permission change on a site can run one check for every inheriting folder on that site, in a single request. The per-folder flags are only checked for the current page, so they're limited by page size. Suggestion: have the plan measure that case on a large site, for example a recursive search right after a permission change on a site with a few thousand folders. Then state an acceptable latency, or add a criterion for it. If the result is too slow, the "no cap" decision in Clarifications can be revisited with data behind it. 4. Say that the cache row is written in the backgroundAC-010 says "once the cache row is written" and AC-012 says "until its row is written", which is correct. What the spec doesn't say is that the write happens later, on a background thread. This has two consequences:
Suggested text:
Comment written by Claude (Claude Code) on behalf of @nollymar. |
…04 (#37749) Address the second spec review on #38073: - list the Publishing Queue and folder bulk duplicate as callers whose behavior changes, with AC-013 and AC-014 - narrow AC-003/AC-004 to uncached inheriting folders; the folder-owner grant and PUBLISH-on-folders differences become named non-goals - describe the unpaged worst case and ask the plan to measure it - say the reference row is written in the background, and make the AC-010/AC-012 tests wait for it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@nollymar thanks, all four points checked out against 1. All four callers. Scope of Investigation and Regression Risk now list the Publishing Queue's Pending tab and the folder bulk duplicate, with what each one decides and how its behavior changes. The bulk duplicate's non-goal now says its code is out of scope, not its behavior.
2. AC-003/AC-004. I took your preferred option and narrowed them to inheriting folders with no cached row. The folder-owner grant and PUBLISH on folders are now named non-goals, described as separate gaps that deserve their own issue. One addition from following that through: once uncached folders go to the one-at-a-time check, that check would answer the publish flag with EDIT, while the same folder once cached gets PUBLISH. AC-004 now says a folder's publish flag must not depend on whether it's cached, so the fallback can't make the flag flip. 3. Worst case. Performance now says paging doesn't limit it (the READ filter runs before paging, while the per-folder flags are limited by page size). The plan measures a recursive search right after a site-level permission change on a site with a few thousand folders and states an acceptable latency; if it's too slow, the "no cap" clarification is revisited with that data. 4. Background write. Performance now says the row is written on a background thread by default, a failed write is only logged, and early repeats are answered from the in-memory cache. "At most once" now refers to the walk up to the parent (AC-012 too). Verification says the AC-010 and AC-012 tests set Comment written by Claude (Claude Code) on behalf of @rjvelazco. |
… admin gap (#37749) Address Dario's review on #38073: list the Liferay isAdmin() bypass as a third known difference next to the owner grant and PUBLISH on folders. An uncached item must get the same answer it gets once cached, so the fallback resolves inheritance but follows the batch filter's rules. AC-003/AC-004/AC-009 and the comparison test say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Spec-Kit PR 1 of 2: this PR carries
spec.mdalone. It needs another dev's approval (not a merge) before/speckit-planruns. PR 2 will branch from here with the implementation.Spec for #37749.
Proposed Changes
specs/37749-content-drive-folder-search-permissions/spec.md, the issue-resolution spec for Fix Content Drive folder tree hiding readable folders from non-admin users #37749.The defect, in short
Content Drive's folder tree hides folders that a non-admin user can read, while the Site Browser shows them. CMS Administrators never see it. The folders come back once something checks them one at a time, so it looks intermittent. Every folder made by Content Drive's bulk duplicate is hidden this way until something checks it.
The server response is already missing the folders. The batch permission filter behind
GET /api/v1/folder/searchgrants READ only when a folder has a cached link to the parent it inherits from (apermission_referencerow) or permissions of its own. That cache is filled lazily and cleared on permission changes above the folder. A folder that inherits and isn't cached yet is dropped. The one-at-a-time check walks up to the parent instead, which is why the Site Browser shows the folder.Decisions recorded in the spec (Clarifications, 2026-10-16)
Worth checking before approving
doesUserHavePermission. The differences stay as they are and go to a follow-up issue: the folder-owner grant, the LiferayisAdmin()bypass, and PUBLISH on folders (which the one-at-a-time check treats as EDIT).🤖 Generated with Claude Code