Home » Modeling » EMF » [CDO] Partially loaded model
[CDO] Partially loaded model [message #660995] |
Tue, 22 March 2011 15:48 |
Egidijus Vaisnora Messages: 47 Registered: July 2009 |
Member |
|
|
Hi,
I had played around "ReadAccessHandler", which supposed to interrupt loading of particular revision. It is good starting point
for implementing some security principles in CDO. Unfortunately, I have noticed that, if part of revisions is not permitted to
load and they are mixed among the revisions which you are allow to load, on client side, I am getting exceptions, even if I
attempt to work with permitted objects.
For example, I have EList of CDOObject which are not loaded (list contains CDOIDs). One CDOIDs are allowed to read other are
not. I know which one is allowed to access for me and I intend to remove one of them (Using EcoreUtil.delete or just removing
from container). And I get exception, because that EMF code is touching forbidden elements in a list.
Problem is clear - EMF doesn't know about such objects and I do not see way to solve this in EMF side. One of possible solution
comes to head is to introduce EMF proxy for elements which are not allowed to load (it could be optional thing). EMF is aware
about proxies and should be able to work with a model without resolving them (?) and throwing exceptions. Thus client will be
able to work with objects which he has right to work, without having access to forbidden object context. For now, it seems that
EMF proxies are not available in CDO word and my concern is, how CDO code will deal with EMF proxies?
Best Regards,
--
Egidijus
|
|
|
Re: [CDO] Partially loaded model [message #661073 is a reply to message #660995] |
Wed, 23 March 2011 00:22 |
|
Hi Egidijus,
I must say I can't answer this question without trying it out. Have you tried it out already?
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Am 22.03.2011 08:48, schrieb Egidijus Vaisnora:
> Hi,
>
> I had played around "ReadAccessHandler", which supposed to interrupt loading of particular revision. It is good starting point for implementing some security principles in CDO. Unfortunately, I have noticed that, if part of revisions is not permitted to load and they are mixed among the revisions which you are allow to load, on client side, I am getting exceptions, even if I attempt to work with permitted objects.
>
> For example, I have EList of CDOObject which are not loaded (list contains CDOIDs). One CDOIDs are allowed to read other are not. I know which one is allowed to access for me and I intend to remove one of them (Using EcoreUtil.delete or just removing from container). And I get exception, because that EMF code is touching forbidden elements in a list.
>
> Problem is clear - EMF doesn't know about such objects and I do not see way to solve this in EMF side. One of possible solution comes to head is to introduce EMF proxy for elements which are not allowed to load (it could be optional thing). EMF is aware about proxies and should be able to work with a model without resolving them (?) and throwing exceptions. Thus client will be able to work with objects which he has right to work, without having access to forbidden object context. For now, it seems that EMF proxies are not available in CDO word and my concern is, how CDO code will deal with EMF proxies?
>
> Best Regards,
> --
> Egidijus
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: [CDO] Partially loaded model [message #661108 is a reply to message #661073] |
Wed, 23 March 2011 08:18 |
Egidijus Vaisnora Messages: 47 Registered: July 2009 |
Member |
|
|
Hi Eike,
No, I haven't tried it yet. I just want to hear what other thinks about EMF proxy in CDO and how it could affect current
functionality with less damage? Could they be used to hide part of the model from client? For now EMF proxy cannot appear in
CDO and I think, maybe it was reason for this, isn't it?
Cheers,
Egisijus
On 3/23/11 2:22 AM, Eike Stepper wrote:
> Hi Egidijus,
>
> I must say I can't answer this question without trying it out. Have you tried it out already?
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>
> Am 22.03.2011 08:48, schrieb Egidijus Vaisnora:
>> Hi,
>>
>> I had played around "ReadAccessHandler", which supposed to interrupt loading of particular revision. It is good starting
>> point for implementing some security principles in CDO. Unfortunately, I have noticed that, if part of revisions is not
>> permitted to load and they are mixed among the revisions which you are allow to load, on client side, I am getting
>> exceptions, even if I attempt to work with permitted objects.
>>
>> For example, I have EList of CDOObject which are not loaded (list contains CDOIDs). One CDOIDs are allowed to read other are
>> not. I know which one is allowed to access for me and I intend to remove one of them (Using EcoreUtil.delete or just removing
>> from container). And I get exception, because that EMF code is touching forbidden elements in a list.
>>
>> Problem is clear - EMF doesn't know about such objects and I do not see way to solve this in EMF side. One of possible
>> solution comes to head is to introduce EMF proxy for elements which are not allowed to load (it could be optional thing). EMF
>> is aware about proxies and should be able to work with a model without resolving them (?) and throwing exceptions. Thus
>> client will be able to work with objects which he has right to work, without having access to forbidden object context. For
>> now, it seems that EMF proxies are not available in CDO word and my concern is, how CDO code will deal with EMF proxies?
>>
>> Best Regards,
>> --
>> Egidijus
|
|
|
Goto Forum:
Current Time: Thu Apr 18 06:23:26 GMT 2024
Powered by FUDForum. Page generated in 0.01964 seconds
|