Bug 480481 - Investigate IPermissionAuthority#canDeleteInstance calls
Summary: Investigate IPermissionAuthority#canDeleteInstance calls
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 3.1.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2015-10-23 04:13 EDT by Florian Barbin CLA
Modified: 2015-10-27 12:17 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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