andi-huber commented on code in PR #3264:
URL: https://github.com/apache/causeway/pull/3264#discussion_r2584004747
##########
core/metamodel/src/main/java/org/apache/causeway/core/metamodel/tabular/internal/DataRowInternal.java:
##########
@@ -67,14 +68,15 @@ public Optional<DataColumn> lookupColumnById(final @NonNull
String columnId) {
public Can<ManagedObject> getCellElementsForColumn(final @NonNull
DataColumn column) {
final ObjectAssociation assoc = column.associationMetaModel();
var interactionInitiatedBy = InteractionInitiatedBy.PASS_THROUGH;
+ var iConstraint = new InteractionConstraint(WhatViewer.invalid(),
interactionInitiatedBy, Where.ALL_TABLES);
return assoc.getSpecialization().fold(
property-> Can.of(
// similar to ManagedProperty#reassessPropertyValue
- property.isVisible(rowElement(),
interactionInitiatedBy, Where.ALL_TABLES).isAllowed()
+ property.isVisible(rowElement(),
iConstraint).isAllowed() //TODO API: should not be required
? property.get(rowElement(),
interactionInitiatedBy)
:
ManagedObject.empty(property.getElementType())),
collection-> ManagedObjects.unpack(
- collection.isVisible(rowElement(),
interactionInitiatedBy, Where.ALL_TABLES).isAllowed()
+ collection.isVisible(rowElement(),
iConstraint).isAllowed() //TODO API: should not be required
Review Comment:
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]