Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 415505 - [server] IMetaStore.readUser() should create the user if it does not exist
Summary: [server] IMetaStore.readUser() should create the user if it does not exist
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Server (show other bugs)
Version: 4.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.0 M2   Edit
Assignee: Anthony Hunter CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 412995
  Show dependency tree
 
Reported: 2013-08-20 12:13 EDT by Anthony Hunter CLA
Modified: 2013-08-27 11:34 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Hunter CLA 2013-08-20 12:13:14 EDT
I had a discussion with John about Bug 413655 and Bug 415000. In both cases we were doing a readUser() of a user that did not exist.

The way CompatibilityMetaStore is implemented, readUser() creates the user when it does not exist.

I did not think this was correct, readUser() only reads and does not create, an explicit createUser() is needed.

In fact this is a supported code path. The intent is that the server may change it's implementation of an IOrionCredentialsService, say changing from Orion's implementation to LDAP. In this case, users in LDAP already exist.

We need to fix IMetaStore.readUser() to indicate a non existing user should be created. We also need to fix the tests.

We also may want to revert the fixes made in Bug 413655 and Bug 415000.
Comment 1 Anthony Hunter CLA 2013-08-27 11:34:31 EDT
(In reply to comment #0)
> We need to fix IMetaStore.readUser() to indicate a non existing user should
> be created. We also need to fix the tests.

Fixed with http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=c4897b256455b71e76c875561d3688257a2653b3