Hi Erik,

This ticket was an early feature leading up towards multi-tenancy support,
and there have been a number of other JIRA issues since about this topic
that extend the idea further.

The good news is that this feature is baked pretty deeply into Isis; we
perform filtering of objects in collections, on the entity page, and in
choices/autoComplete.

If you want to explore further, look at the callers of
ObjectAdapter.Util#visibleAdapters(...) and
ObjectAdapter.Util#isVisible(...).  You'll see also that there is an enum
called InteractionInitiatedBy. We only ever perform filtering for
interactions initiated by the user (ie "through" the viewer), other
interactions are internal (initiated by the framework or are programmatic
between domain objects) and we wouldn't want to filter those out.

The bad news is that the only API to this feature is through the facet
factory API.  In particular, you need to install a facet that implements
HidingInteractionAdvisor on the ObjectSpecification.  This can then veto
access to any object.  Still, you can adapt the
TenantedAuthorizationFacetFactory [1] in isis-module-security and install
by editing isis.properties , eg same as [2]

FYI, my first draft of this email was that one could also veto using a
regular subscriber and veto access to all properties ... but turns out I
was wrong.  I've raised a ticket as a possible enhancement, eg to have a
new domain event representing "this object is being interacted with". [3]
 That would then allow a programmer to write a subscriber to veto
visibility.

Hope that helps

Dan

[1]
https://github.com/isisaddons/isis-module-security/blob/f2b456ebc4958634bfe4cdae5d964bbd5b3b5dba/dom/src/main/java/org/isisaddons/module/security/facets/TenantedAuthorizationFacetFactory.java
[2] https://github.com/isisaddons/isis-module-security#tenancy-checking
[3] https://issues.apache.org/jira/browse/ISIS-1281


On 16 December 2015 at 10:39, Erik de Hair <[email protected]> wrote:

> Hi,
>
> I found an issue about collection filtering [1]. Do I need to implement
> something to make this work? Is there any documentation about this? We're
> not using the security module.
>
> Thanks,
> Erik
>
> [1] https://issues.apache.org/jira/browse/ISIS-985
>

Reply via email to