Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335506 - Migration of user right data
Summary: Migration of user right data
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-26 15:22 EST by John Arthorne CLA
Modified: 2011-09-01 11:42 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 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.