stable
Clone or download
This task is part of story #8528 create nonexistant user account at import time Now that we have a users mapping file[1] we can now start to import it during the import of project in order to fix issues when users cannot be found. This commit introduces a new option to the import script: --force-create-all-users-active Usage is the following: src/utils/php-launcher.sh src/utils/import_project_xml.php \ -p 315 \ -u jdoe \ -i /tmp/archive.zip \ -m /tmp/mapping-users.csv \ --force-create-all-users-active This option allows the admin to confirm the mapping, the creation of new users or the activation of deleted/suspended users. This option is temporary and will be removed in the future when we will be able to switch back a user to her original state. As of today this option does nothing really exciting. It only parses mapping file, and displays treatment to be done on each user. Creation, mapping and activation are marked as "Not yet implemented" and will be done in a next future. [1] See following reviews for reference: * I258546408ed3ed9e2946e4dcf7025dc1ac3abe1a * Iaadf046baf93c381150450a65e030ce3ad298fbe Change-Id: I379a8765cd11d4ce28cec9f3115d568cd699e2f4
Modified Files
Name | ||||
---|---|---|---|---|
M | src/common/autoload.php | +5 | −2 | Go to diff View file |
M | src/common/log/ConsoleLogger.class.php | +2 | −2 | 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/MappingFileOptimusPrimeTransformer.php | +2 | −2 | Go to diff View file |
A | src/common/user/XML/Import/ReadyToBeImportedUser.php | +28 | −0 | Go to diff View file |
A | src/common/user/XML/Import/ReadyToBeImportedUsersCollection.php | +47 | −0 | Go to diff View file |
M | src/common/user/XML/Import/UsersToBeImportedCollectionBuilder.php | +35 | −4 | Go to diff View file |
A | src/common/user/XML/Import/UsersXMLNotFoundException.php | +29 | −0 | Go to diff View file |
M | src/common/user/XML/Import/WillBeActivatedUser.php | +7 | −1 | Go to diff View file |
M | src/common/user/XML/Import/WillBeCreatedUser.php | +7 | −1 | Go to diff View file |
M | src/common/user/XML/Import/WillBeMappedUser.php | +7 | −1 | Go to diff View file |
M | src/utils/check_user_mapping_for_project_import.php | +7 | −8 | Go to diff View file |
M | src/utils/generate_user_mapping_for_project_import.php | +7 | −12 | Go to diff View file |
M | src/utils/import_project_xml.php | +44 | −10 | Go to diff View file |
M | tests/simpletest/common/user/XML/Import/UsersToBeImportedCollectionBuilderTest.php | +6 | −1 | Go to diff View file |