upthewaterspout commented on a change in pull request #5858:
URL: https://github.com/apache/geode/pull/5858#discussion_r551521495



##########
File path: 
geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/results/LuceneGetPageFunction.java
##########
@@ -65,15 +70,19 @@ public void execute(FunctionContext context) {
     }
   }
 
-  protected PageEntry getEntry(final Region region, final Object key) {
+  protected PageEntry getEntry(final Region region, final Object key,
+      SecurityService securityService, Object principal) {
     final EntrySnapshot entry = (EntrySnapshot) region.getEntry(key);
     if (entry == null) {
       return null;
     }
 
-    final Object value = entry.getRegionEntry().getValue(null);
+    Object value = entry.getRegionEntry().getValue(null);
     if (value == null || Token.isInvalidOrRemoved(value)) {
       return null;
+    } else if (securityService.needPostProcess()) {
+      value = securityService.postProcess(principal, region.getFullPath(), 
key, entry.getValue(),

Review comment:
       I'm a little concerned that `value` here might be a CachedDeserializable 
in some cases. I think this whole function and PageEntry class are designed to 
try to pass the value back to the user without deserializing it if it can. 
   
   However I can't think of a case that you didn't test already, so I guess 
it's doing the right thing.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to