stable

Clone or download

Read-only

request #9419 It should be possible to create ldap users at XML import

This patch takes the ldapid defined in XML and insert it into the DB. The initial proposal was to created a new, dedicated action like "create-with-ldapid" but if we want to insert more info about users in the future we will be stuck. Moreover it makes sense to treat all XML data as trusted (hence to create users with those informations). How to test: - You need to desactivate LDAP Write on your platform - You need to have a users.xml that reference an ldapid that doesn't exists in the LDAP - Import the project (you should update mapping to have create:A). -> Check as site admin, you should have an entry for this user with "No enterprise directory login found" - Then create manually (ldapadd) the entry that corresponds to the user in LDAP (for the lazy, one example: http://paste.debian.net/791260/) Be careful to have the 'employeeNumber' attribute that matches ldapid defined in XML. - After having inserted in LDAP, if you go back to site admin page for the user, it should automatically pair the accounts (no longer error message login not found) - Then the user can login and get the LDAP welcome page. - Do not forget to reactivate LDAP write after! Change-Id: Ic3c53ac779e828651187d31f33443c84346ba65e

Modified Files

Name
M plugins/ldap/include/LDAP_UserDao.class.php +4 −3 Go to diff View file
M src/common/user/XML/Import/MappingFileOptimusPrimeTransformer.php +3 −2 Go to diff View file
M src/common/user/XML/Import/WillBeCreatedUser.php +7 −2 Go to diff View file
M tests/lib/rest/TestDataBuilderNG.php +0 −1 Go to diff View file
M tests/simpletest/common/user/XML/Import/MappingTest.php +1 −1 Go to diff View file
M tests/simpletest/common/user/XML/Import/WillBeCreatedUserTest.php +2 −1 Go to diff View file