Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341536 - Migrating to new workspace takes away the admin user's super powers
Summary: Migrating to new workspace takes away the admin user's super powers
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-03-31 15:23 EDT by Mark Macdonald CLA
Modified: 2011-09-01 11:41 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Macdonald CLA 2011-03-31 15:23:50 EDT
Orion 0.2M6

1. Launch the Orion server with a new workspace, like this:
 -data workspace
 -vmargs -Dorion.storage.admin.default.password=mypassword
2. Log in as admin/mypassword. Go to /manage-users.html. Everything works OK.
3. Quit the server. Follow the instructions at [1] to migrate account names to a new workspace "workspace2"
4. Launch the server with 
 -data workspace2
5. Log in as admin/mypassword. Go to /manage-users.html and you'll get a 403.

The admin user's permissions were in the Users.prefs file from the old workspace. We didn't migrate that file, and the server never creates the admin user again (since it already exists in the migrated securestorage). So admin never regains access to the manage-users page.


[1] http://wiki.eclipse.org/Orion/Server_admin_guide#Creating_an_admin_user
Comment 1 John Arthorne CLA 2011-03-31 15:38:04 EDT
I had this problem when migrating orion.eclipse.org, but used the admin's secret "vi" super power to add my super powers back.

There is a fairly trivial fix in SecureStorageCredentialsService#initStorage. Simply remove the "add admin rights" from the if block. I considered doing this for M6 when I hit the problem, but decided it was too late and a manual fix of the access rights was easier.
Comment 2 John Arthorne CLA 2011-03-31 15:44:24 EDT
(In reply to comment #1)
> There is a fairly trivial fix in SecureStorageCredentialsService#initStorage.
> Simply remove the "add admin rights" from the if block. I considered doing this
> for M6 when I hit the problem, but decided it was too late and a manual fix of
> the access rights was easier.

This is probably obvious, but by "remove from if block" I meant "move after the if block".
Comment 3 John Arthorne CLA 2011-04-29 09:59:26 EDT
I'm going to release this fix because it otherwise adds a painful step to server migration on orionhub.org