You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Erik de Hair <e....@pocos.nl> on 2015/12/16 11:39:59 UTC
Collection filtering
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
Re: Collection filtering
Posted by Erik de Hair <e....@pocos.nl>.
On 12/23/2015 03:44 PM, Dan Haywood wrote:
> 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]
Ok, thank you. I think I know how to do that.
>
> 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 <e....@pocos.nl> 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
>>
Re: Collection filtering
Posted by Dan Haywood <da...@haywood-associates.co.uk>.
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 <e....@pocos.nl> 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
>