stable
Clone or download
This task is part of story #8528 create nonexistant user account at import time Once the user mapping file has been generated by src/utils/generate_user_mapping_for_project_import.php, one should update it to check and fix potential issues. For example: name,action,comments achille,activate,"Existing user achille must be activated (was [S])" After investigations, it appears that achille user on the source platform does not correspond to the suspended user achille, but corresponds to jdoe user on the target platform. Therefore the mapping should be updated: name,action,comments achille,map:jdoe,"achille is jdoe" Note: The comments are here only for generation, they are ignored during import time. They can be changed by hand to explain/remember choice made. They are some forbidden actions. For example, achille is a suspended user in target platform, therefore one cannot choose to create it, the following mapping file will be forbidden: name,action,comments achille,create,"…" Here are the list of actions that are permitted based on the type of the user: +----------------------+--------+----------+-----+ | user types \ actions | create | activate | map | +----------------------+--------+----------+-----+ | To Be Created | ✓ | . | ✓ | | To Be Activated | . | ✓ | ✓ | | To Be Mapped | . | . | ✓ | | Already Existing | . | ✓ | ✓ | | Email Does Not Match | . | . | ✓ | +----------------------+--------+----------+-----+ As explained by the title of this commit message, no actions occur, only a feedback is displayed on the console. Change-Id: Iaadf046baf93c381150450a65e030ce3ad298fbe
Modified Files
Name | ||||
---|---|---|---|---|
M | src/common/autoload.php | +11 | −2 | Go to diff View file |
A | src/common/user/XML/Import/ActionToBeTakenForUser.php | +65 | −0 | Go to diff View file |
M | src/common/user/XML/Import/AlreadyExistingUser.php | +7 | −1 | Go to diff View file |
M | src/common/user/XML/Import/EmailDoesNotMatchUser.php | +8 | −4 | Go to diff View file |
A | src/common/user/XML/Import/InvalidMappingFileException.php | +24 | −0 | Go to diff View file |
A | src/common/user/XML/Import/MappingFileDoesNotExistException.php | +24 | −0 | Go to diff View file |
A | src/common/user/XML/Import/MappingFileOptimusPrimeTransformer.php | +144 | −0 | Go to diff View file |
A | src/common/user/XML/Import/MissingEntryInMappingFileException.php | +24 | −0 | Go to diff View file |
M | src/common/user/XML/Import/ToBeActivatedUser.php | +9 | −3 | Go to diff View file |
M | src/common/user/XML/Import/ToBeCreatedUser.php | +9 | −3 | Go to diff View file |
M | src/common/user/XML/Import/ToBeMappedUser.php | +8 | −4 | Go to diff View file |
M | src/common/user/XML/Import/User.php | +2 | −15 | Go to diff View file |
A | src/common/user/XML/Import/UserNotFoundException.php | +24 | −0 | Go to diff View file |
M | src/common/user/XML/Import/UsersToBeImportedCollection.php | +10 | −1 | Go to diff View file |
A | src/common/user/XML/Import/WillBeActivatedUser.php | +44 | −0 | Go to diff View file |
A | src/common/user/XML/Import/WillBeCreatedUser.php | +56 | −0 | Go to diff View file |
A | src/common/user/XML/Import/WillBeMappedUser.php | +47 | −0 | Go to diff View file |
A | src/utils/check_user_mapping_for_project_import.php | +116 | −0 | Go to diff View file |
A | tests/simpletest/common/user/XML/Import/AlreadyExistingUserTest.php | +48 | −0 | Go to diff View file |
A | tests/simpletest/common/user/XML/Import/EmailDoesNotMatchUserTest.php | +49 | −0 | Go to diff View file |
A | tests/simpletest/common/user/XML/Import/MappingFileOptimusPrimeTransformerTest.php | +388 | −0 | Go to diff View file |
A | tests/simpletest/common/user/XML/Import/ToBeActivatedUserTest.php | +48 | −0 | Go to diff View file |
A | tests/simpletest/common/user/XML/Import/ToBeCreatedUserTest.php | +50 | −0 | Go to diff View file |
A | tests/simpletest/common/user/XML/Import/ToBeMappedUserTest.php | +52 | −0 | Go to diff View file |
M | tests/simpletest/common/user/XML/Import/UsersToBeImportedCollectionBuilderTest.php | +9 | −9 | Go to diff View file |