[MGNLPER-173] JcrSearchResultSupplier should consider users access Created: 31/Aug/22 Updated: 18/Apr/23 Resolved: 18/Apr/23 |
|
| Status: | Closed |
| Project: | Periscope |
| Component/s: | None |
| Affects Version/s: | 1.2.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Richard Gange | Assignee: | Miguel Martinez |
| Resolution: | Obsolete | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 0.25h | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Template: |
|
||||
| Acceptance criteria: |
Empty
|
||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||
| Date of First Response: | |||||
| Epic Link: | [JCR] Search Performance issues | ||||
| Story Points: | 5 | ||||
| Team: | |||||
| Description |
|
Only search folders where the current user has READ rights. Don't suggest items which the user cannot access anyway. Measure and record the times before the change and after the change in this ticket using the big data environment. We have a common place for the metrics here: https://www.notion.so/magnoliacms/Monitoring-and-tracking-metrics-d6c3037f7a584aa79911ecaf3d3bd22f Notes |
| Comments |
| Comment by Miguel Martinez [ 18/Apr/23 ] |
|
The current user is already being in consideration in the latests versions, this mecanism is provided by JCR and the sessions as is here
final Session session = contextProvider.get().getJCRSession(definition.getWorkspace());
When we administer session to the query we are already setting behind the scenes the session, the users and it's ACLS public SearchRunBatch search(SearchQuery searchQuery, Collection<SearchResultSupplier> suppliersToSearchIn) { AsynchronousContext.OperationFactory asynchronousContext = asynchronousContextOperationProvider.get(); return searchRunner.execute(suppliersToSearchIn, supplier -> { try { return asynchronousContext.wrap(() -> fetchSupplierAwareSearchResults(searchQuery, supplier)).call(); } catch (Exception e) { throw new RuntimeException(e); } } ); }
|