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

Bug 335506

Summary: Migration of user right data
Product: [ECD] Orion Reporter: John Arthorne <john.arthorne>
Component: ClientAssignee: John Arthorne <john.arthorne>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Szymon.Brandys
Version: 0.2   
Target Milestone: 0.2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description John Arthorne CLA 2011-01-26 15:22:43 EST
In bug 335440 we had an example of a breaking change to the user authentication data. I suspect this isn't the last time we will need to alter the format, so we should have a mechanism in place to handle migration of the data. I suggest:

 - Also write a property "UserRightsVersion" for each user with a simple integer value
 - AuthorizationService class reads the version, and delegates to a separate class to read the authorization data from preferences into a JSONObject (AuthorizationReaderV1, AuthorizationReaderV2, etc)
 - AuthorizationService always writes data in the "latest" format and sets the UserRightsVersion property to the latest version number.
Comment 1 John Arthorne CLA 2011-01-26 16:05:26 EST
Although we could probably get away with no migration this time, it is a good opportunity to get that infrastructure in place now.
Comment 2 John Arthorne CLA 2011-01-26 16:34:47 EST
I have released migration support for the "old" M4 format and the current format.