AnsweredAssumed Answered

Creating temporary User Home prior to LDAP sync

Question asked by mitchb on Jul 18, 2016
I have a pretty unusual use case, and I'm trying to figure out the best approach. I'm just posting this as a sanity check, and am completely open to advice if you think there is an easier/better way to do this.

In our scenario, we will be using Alfresco to store on-boarding records during the hiring process. Upon HR approval in an external system, the documents for a user will be migrated in via a custom migration app. We want the docs to be filed within a subdirectory in User Homes since each user gets one automatically at the time of user creation via LDAP sync.

The problem is that the user creation in the company's LDAP happens after that point of ingest, including assignment of a username, but HR needs access to those docs in Alfresco immediately. So at the time of the document ingest, I am proposing that we manually create an orphan User Home space for the user and assign it a temporary unique ID. After the user is created in LDAP, we want the LDAP sync create the user object itself and "adopt" that User Home folder.

Here's my idea of how this would work:
1. Upon one-time document ingest, file documents in
Company Home/User Homes/123abc/onboarding-docs/

2. Outside Alfresco, create LDAP user for this new hire with
and LDAP field
tempID = 123abc

3. Upon LDAP sync, check whether <strong>testperson</strong> exists in Alfresco
    a. If exists, go about process as normal (update user properties with any changes, don't act upon User Home)
    b. If does not exist, create user as normal, and locate folder where LDAP tempID = folder's cm:name
    c. "Adopt" the folder by changing its name to <strong>testperson</strong> and recording the noderef in the cm:homeFolder property of the new testperson user.

I am still learning about the configuration possibilities for User Home creation and LDAP synchronization so any advice would be helpful.