Saturday, May 12, 2012

Fixing Alfresco's external user issue (external user cannot authenticate because he is created as disabled)

Hi, all:

Recently I installed Alfresco for one of our customers. We set it up to used LDAP authentication and Synchronization against Zimbra's LDAP an it all worked just fine. The authentication chain was, therefore, first LDAP, second AlfrescoNTLM (the default internal authentication).

However, when testing the service with our client, we encoutered an issue: external users that were invited to a site received the email, but could not login to Alfresco Share. After googling around for a while, I found that it is a know issue in version 4.0.d (probably previous as well). See, for example, ALF-12242 and ALF-13289.

While a fix has existed for a while in Alfresco Enterprise, there was no solution for Community Edition. One of the above links actually says what the solution is (changing a few lines in a java class called InviteHelper and recompiling it), so we  downloaded the source code, fixed it, recompiled and packaged it back again on its corresponding JAR file. If you want it, you can take it from here. Note that you need to place this file under tomcat/webapps/alfresco/WEB-INF/lib/alfresco-repository-4.0.d.jar (yes, you must overwrite the previous one).

I hope it is useful for you!