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

Bug 382147

Summary: GitCloneHandlerV1 doesn't correctly add/remove project permissions
Product: [ECD] Orion Reporter: John Arthorne <john.arthorne>
Component: GitAssignee: John Arthorne <john.arthorne>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: Szymon.Brandys
Version: unspecified   
Target Milestone: 1.0 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Ken's projects and permissions
none
Fix none

Description John Arthorne CLA 2012-06-08 15:18:15 EDT
In bug 356974, a fix was made so that when a project was deleted, the corresponding permissions were also deleted. 

The same bug fixed a case where we added too many permissions on project creation: /file/<project> and /workspace/<workspace>/project/<project>.

However the project creation and deletion code is copied in GitCloneHandlerV1, and the fix was not made in that code. So if you create projects by cloning, or delete projects via the repositories page, the bug still occurs.
Comment 1 John Arthorne CLA 2012-06-08 15:21:51 EDT
Created attachment 217097 [details]
Ken's projects and permissions

Just for reference this is data I used to track down the problem. This is Ken's current permissions on orion.eclipse.org, and the set of projects that Ken actually has in his workspace. Permissions of this form should not exist at all:

{"Method"\:15,"Uri"\:"/workspace/E/project/Id"},
{"Method"\:15,"Uri"\:"/workspace/E/project/Id/*"},

And any permissions that still exist that don't have an existing project, I suspect Ken deleted from the Repositories page.
Comment 2 John Arthorne CLA 2012-06-08 16:59:23 EDT
Created attachment 217105 [details]
Fix
Comment 3 John Arthorne CLA 2012-06-08 17:06:06 EDT
The above patch removes the duplicated code between GitCloneHandler and WorkspaceResourceHandler. This is too scary for 0.5 so maybe there is a quick fix (like disable deletion from the repositories page - you can delete in the navigator anyway).