andi-huber commented on code in PR #3264:
URL: https://github.com/apache/causeway/pull/3264#discussion_r2584007909
##########
core/metamodel/src/main/java/org/apache/causeway/core/metamodel/tabular/simple/DataRow.java:
##########
@@ -42,18 +44,21 @@ public Can<ManagedObject> getCellElements(
final @NonNull DataColumn column,
final InteractionInitiatedBy interactionInitiatedBy) {
var assoc = column.metamodel();
+
+ var iConstraint = new InteractionConstraint(WhatViewer.invalid(),
interactionInitiatedBy, Where.ALL_TABLES);
+
return assoc.getSpecialization().fold(
property-> Can.of(
// similar to ManagedProperty#reassessPropertyValue
interactionInitiatedBy.isPassThrough()
- || property.isVisible(rowElement(),
interactionInitiatedBy, Where.ALL_TABLES).isAllowed()
- ? property.get(rowElement(),
interactionInitiatedBy)
- :
ManagedObject.empty(property.getElementType())),
+ || property.isVisible(rowElement(),
iConstraint).isAllowed() //TODO API: should not be required
+ ? property.get(rowElement(),
interactionInitiatedBy)
+ : ManagedObject.empty(property.getElementType())),
collection-> ManagedObjects.unpack(
interactionInitiatedBy.isPassThrough()
- || collection.isVisible(rowElement(),
interactionInitiatedBy, Where.ALL_TABLES).isAllowed()
- ? collection.get(rowElement(),
interactionInitiatedBy)
- : null
+ || collection.isVisible(rowElement(),
iConstraint).isAllowed() //TODO API: should not be required
+ ? collection.get(rowElement(),
interactionInitiatedBy)
+ : null
Review Comment:
same as in `DataRowInternal`, confusing:
we are checking whether a property is visible, constraint by WhatViewer and
Where, but then use path-through, ignoring user access constraints to get the
property
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]