-
Notifications
You must be signed in to change notification settings - Fork 314
CAUSEWAY-3752: provide SPI to describe which classes are surfaced by the different viewers #3264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
plus some refactoring
introduces WhatViewer for filtering t.b. done later
InteractionConstraint
InteractionConstraint (2)
|
|
||
| return property.isVisible(owner, InteractionInitiatedBy.FRAMEWORK, getWhere()).isAllowed() | ||
| && property.isVisible(owner, InteractionInitiatedBy.USER, getWhere()).isAllowed() | ||
| return property.isVisible(owner, iConstraint().withInitiatedBy(InteractionInitiatedBy.FRAMEWORK)).isAllowed() //TODO strange API |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the only place where we ask framework and user visibility;
how is this justified?
| RenderPolicy renderPolicy) | ||
| implements VisibilityContext { | ||
|
|
||
| // public CollectionVisibilityContext( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ultimately not needed, remove
| 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| || 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
| @Override | ||
| public void process(final ProcessClassContext processClassContext) { | ||
| var facetHolder = processClassContext.getFacetHolder(); | ||
| //TODO WIP FacetUtil.addFacet(new HiddenFacetForFeatureFilterImpl(facetHolder)); | ||
| } | ||
|
|
||
| @Override | ||
| public void process(final ProcessMethodContext processMethodContext) { | ||
| var facetHolder = processMethodContext.getFacetHolder(); | ||
| //TODO WIP processMethodContext.getFeatureType().isProperty(); | ||
| //TODO WIP FacetUtil.addFacet(new HiddenFacetForFeatureFilterImpl(facetHolder)); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs implenting
ProtoypeFacet