Bug 480481

Summary: Investigate IPermissionAuthority#canDeleteInstance calls
Product: [Modeling] Sirius Reporter: Florian Barbin <florian.barbin>
Component: CoreAssignee: Project inbox <sirius.core-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: laurent.redor
Version: 3.1.0Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Florian Barbin CLA 2015-10-23 04:13:19 EDT
The IPermissionAuthority#canDeleteInstance contract did not specify that the element container editing should be authorized to delete the element. Hence, we perform a double check in some places:
(from gerrit https://git.eclipse.org/r/#/c/57511/ comment)

ModelAccessor.eDelete does a canEditInstance(container) after canDeleteInstance on the object to delete: useless with the new contract.

DeletionCommandBuilder.buildDeleteFromToolTask calls canEditInstance on the containerView (as done by Tree and TableCommandFactory) : should call can delete on the delete element view ? (-> the lock is put on the DRepresentation, so it will not change anything but will be more consistent).

DeleteFromModelWithHookAction.checkDeletionIsAllowed check if an element can be deleted using canEditInstance on the container (same than DeleteionCommandBuilder)


The preceding remarks make me think that we should at least create a bugzilla to correct/check the items. 

Be aware that this might have impact regarding the implementations of the permission authority