When creating users with values from our LDAP server with the following groovy script, the object “XWiki.LDAPProfileClass” is empty, regardless if we use “getObject” or “newObject”:
After creation the object inspector shows a class of type “XWiki.LDAPProfileClass” attached to the user, but it does not contain any attributes. When clicking on “New LDAPProfileClass object”, we only get the error “Failed:Not Found”.
This only happens on a newly installed instance, that is configured for LDAP login, as long as no LDAP user ever logged in.
Why does this happen and how can we avoid it? Thanks in advance!
The XWiki.LDAPProfileClass class is automatically generated by the LDAP authenticator the first time it creates a user, so that’s probably your problem.
An alternative would be to use the standard XWiki#createUser API which is taking care of this (and also to add the user to configured default groups), before adding the LDAPProfileClass. This is what the LDAP authenticator is doing.
Ok, thank.
Maybe you can give me a hint concerning one issue I’m currently testing.
We plan to migrate from Confluence to XWiki (without any payed services). We are a software developer company, so technical issues my not be the problem, if we understand the relationships
Current Question:
We plan to use the “Filter streams Converter” to import Confluence Spaces one by one.
We plan to use the “LDAP Authenticator” in XWiki, which is already configured in our testenvironment.
Our aim: Users/authors of our Confluence content imported into XWiki should successfully mapped to the users handled/created/… by the “LDAP Authenticator” (the users with the mapping info attached).
e.g. there is a Confluence page imported with the user “dibr”, how can I accomplish that this page author is correctly mapped to the “LDAP Authenticator” user? Have I to hold a special setting/import order or something like this?
In a first test a user “dibr_1” was created, when logging in with the LDAP account and the mapping was not working.
You need to make sure this user is an LDAP user with the right uid. In practice, that means adding the right LDAPProfileClass object (which is what is in charge of maintaining the mapping).
When a user already exist at the location, but is not the right user from LDAP point a view, a new one is created to avoid causing problems.