Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 458407

Summary: IPermissionAuthority can't pervent edges from being moved on a diagram
Product: [Modeling] Sirius Reporter: Yvan Lussaud <yvan.lussaud>
Component: CoreAssignee: Project inbox <sirius.core-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: laurent.redor
Version: 2.0.0Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Plugin with a"ReadOnly" PermissionProvider
none
Test project to import in runtime none

Description Yvan Lussaud CLA 2015-01-26 08:38:38 EST
I implemented an org.eclipse.sirius.ecore.extender.business.api.permission.IPermissionAuthority. When all its methods IPermissionAuthority.can* return false, edges and edges labels can be moved on the diagram. Obviously it should not be the case.
Comment 1 Laurent Redor CLA 2015-01-27 04:50:38 EST
Created attachment 250246 [details]
Plugin with a"ReadOnly" PermissionProvider

This permission provider awlays provides a IPermissionAuthority that returns false to all can*() methods.
Comment 2 Laurent Redor CLA 2015-01-27 04:51:06 EST
Created attachment 250247 [details]
Test project to import in runtime
Comment 3 Laurent Redor CLA 2015-01-27 04:55:51 EST
I don't reproduce your problem. I added a simple use case.

* Import the project PluginWithReadOnlyPermissionProvider (from PluginWithReadOnlyPermissionProvider.zip) in your workspace
* Launch a runtime
* Import the project Test (from runtimeTestProject.zip)
* Open the diagram "new DiagramTest" from representations.aird file
* Every thing is "freezed" even the edges and the edges labels.

Can you try this example in your environment?


P.S. : I only notice a bug in the documentation of the org.eclipse.sirius.ecore.extender.PermissionProvider. I will create another bug for that.
Comment 4 Laurent Redor CLA 2015-01-27 05:06:39 EST
The issue for the documentation problem of extension point (end of comment 3) is bug 458501.
Comment 5 Yvan Lussaud CLA 2015-01-28 04:12:36 EST
I tested your IPermissionAuthority and it works find after changing the getLockStatus() method. I will register my IPermissionAuthority in a gentle way using the extension point. :)
Comment 6 Laurent Redor CLA 2015-01-28 04:15:42 EST
This issue is invalid.