[EMF] privileges for user and modification management [message #423481] |
Wed, 01 October 2008 07:26 |
Tristan Faure Messages: 460 Registered: July 2009 |
Senior Member |
|
|
Hi everybody !
i need for my work to think about modification management of an EMF model.
An user will have the possibility to define profiles with some rights
granted to them. And the editor will have to respect these rights.
BUT
I need to do this stuff working with all existing EMF editor (GMF, emf
generated, others ...) So what kind of EMF mechanism can be useful :( ???
I've looked for the Factory overriding mechanism to override the factory
and so adding data for rights management but i think it's not the good
solution so i hope you'll be able to help me ?
Thanks
|
|
|
|
|
|
Re: [EMF] privileges for user and modification management [message #423493 is a reply to message #423488] |
Wed, 01 October 2008 12:21 |
Tristan Faure Messages: 460 Registered: July 2009 |
Senior Member |
|
|
Hi thank you for your answer
Mario Winterer a écrit :
> Hi!
>
> If you are using EMF Transactions, you could use a special validator
> that checks the permissions against all notifications. An invalid
> transaction will autmatically be rolled back.
Yes I checked for transaction but my work need to be efficient with all
types of editors and for example emf generated editor doesn't use
transactions (i think)
>
> Without EMF Transactions, you could add an EContentAdapter to your
> ResourceSet to listen to all model changes and so check the permissions.
>
> But without transaction support it will be difficult because throwing a
> Permission-exception somewhere inside a model change operation (a
> command) might result in an invalid model state. Maybe collecting all
> permission-violations and calling undo on the command after its
> completion would do the thing.
>
> Best regards,
> Mario
>
I don't really know EContentAdapter process but for this use case it
could be better to use the mechanism design in this bug :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=247130
Maybe i'll see in this direction but i also need to give user rights
information to user before modification maybe i can do that overriding
the content provider
>
> Tristan FAURE schrieb:
>> Hi everybody !
>>
>> i need for my work to think about modification management of an EMF
>> model.
>> An user will have the possibility to define profiles with some rights
>> granted to them. And the editor will have to respect these rights.
>>
>> BUT
>>
>> I need to do this stuff working with all existing EMF editor (GMF, emf
>> generated, others ...) So what kind of EMF mechanism can be useful :( ???
>>
>> I've looked for the Factory overriding mechanism to override the
>> factory and so adding data for rights management but i think it's not
>> the good solution so i hope you'll be able to help me ?
>>
>> Thanks
|
|
|
Powered by
FUDForum. Page generated in 0.04527 seconds