cancel
Showing results for 
Search instead for 
Did you mean: 

Development in Alfresco

ganesh
Champ in-the-making
Champ in-the-making
Hi!

Alfresco is simply the best content management system.Great work!

I want to change some (images)'gifs' and replace them with some other images how can i do that.I had successfully installed your alfresco in my machine.And one more thing is that i have to give access to only some of myfriends( i mean to say i have to filter some users based on their email ids), how can i do that.please help me,where to change the code.
Thanks in advance!
7 REPLIES 7

kevinr
Star Contributor
Star Contributor
Thanks for your kind comments Smiley Happy

The images are unpacked from the WAR at deploy time e.g. for example:

jakarta-tomcat-5.5.12\webapps\alfresco\images
and this folder has the CSS:
jakarta-tomcat-5.5.12\webapps\alfresco\css

You may want to unpack the whole "alfresco.war" file yourself and repack it and redeploy with your changes - otherwise if you redeploy Alfresco you will lose your changes to the images.

You can use the "Manage Space Users" dialog to invite users into specific spaces (effectively controlling their permissions). As the admin user, you can create spaces that are private or only allow the specifically invited users to view or edit documents within them. The "Alfresco Tutorial.pdf" provided with the produce (and installed as part of the bootstrap data) has examples of this.

Thanks!

Kevin

ganesh
Champ in-the-making
Champ in-the-making
Hi kevin!

Thanks for your response.I wnat to change some code in alfresco for that
i tried with the following link (svn://www.alfresco.org/alfresco/HEAD )but i could not get please help me or give me some link where i can download the source code.
I want to know how LDAP is integrated with alfresco.
I want to access email ids from our LDAP server.how to integrate that.
is there any prerequisite is necessary what s/w i need to install.
please give step-by-step procedure.

Thanks in advance!

ganesh
Champ in-the-making
Champ in-the-making
Hi kevin

Even this link also not helpful.
http://svn.site.org/repository.
where to download the source code.please help me!
Thanks

turgayz
Champ in-the-making
Champ in-the-making

ganesh
Champ in-the-making
Champ in-the-making
Hi turgayz
Thanks for your inputs!
where to place the file and run this prg.i have followed the links and i found this prg to conncet to LDAP
Do i need to download the source bundle, if so where to download(give me the URL).Please help me!
Thanks in advance!
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
*   http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.repo.security.authentication;

import java.io.UnsupportedEncodingException;

import com.novell.ldap.LDAPConnection;
import com.novell.ldap.LDAPException;
import com.novell.ldap.LDAPResponse;
import com.novell.ldap.LDAPResponseQueue;

/**
* A simple LDAP authentication component implementation using the Novel ldap client
* contributed to open ldap.
*
* This is a very simple example with no bells/whistles or configuration.
* The authentication is NOT over SSL or using the SASL bits of LDAP v3.
*
* It shows the basics of implementing an authentication component.
*
* This example was tested against an Active Directory LDAP server using simple authentication.
*
* We make no recommendation about how you structure the data held in your ldap repository.
*
* @author Andy Hind
*/
public class LDAPAuthenticationComponentImpl extends AbstractAuthenticationComponent
{
   
    /*
     * A variable storing the LDAP host - you would normally configure this in the spring bean definition.
     */
    private static final String LDAP_HOST = "YOUR_LDAP_HOST";

    public LDAPAuthenticationComponentImpl()
    {
        super();
    }

    /**
     * Implement the authentication method
     */
    public void authenticate(String userName, char[] password) throws AuthenticationException
    {
       
        try
        {
            // Get a connection to the LDAP server
            LDAPConnection connection = new LDAPConnection();
            connection.connect(LDAP_HOST, LDAPConnection.DEFAULT_PORT);
           
           
            // Bind to the LDAP server
            // The password needs to be in UTF8
            byte[] pw = new String(password).getBytes("UTF8");
            LDAPResponseQueue responseQueue = connection.bind(LDAPConnection.LDAP_V3, getLoginDN(userName), pw, (LDAPResponseQueue)null );
            LDAPResponse response = (LDAPResponse)responseQueue.getResponse();
           
            // Deal with the response
            if(response.getResultCode() != LDAPException.SUCCESS)
            {
                throw new AuthenticationException("Authentication Failed: Code = "+response.getResultCode() +" message = "+response.getErrorMessage());
            }
           
            // We probably have some more work to do to get the actual user name (as opposed to the distinguished name)
            // Our "cn" entries are for "names" not the windows user…
           
           
            // Authentication has been successful.
            // Set the current user, they are now authenticated.
            setCurrentUser(userName);
           
           
            // Close the ldap connection - we are done
            // Not sure if this should be in a finally block ….
            connection.disconnect();
           
        }
        catch (LDAPException e)
        {
           
        }
        catch (UnsupportedEncodingException e)
        {
           
        }
    }
   
    /**
     * A helper method to build the distinguished name for the user trying to authenticate.
     *
     * @param userName
     * @return
     */
    private String getLoginDN(String userName)
    {
        return "cn="+userName+",ou=SomeGroup,dc=acme,dc=com";
    }
}

andy
Champ on-the-rise
Champ on-the-rise
Hi

This code qutoed is a simple example of implementing your own authentication module.

There is quite a bit more to getting LDAP to work.

LDAP support is available in the enterprise product
    - Automated group and user import
    - LDAP and JAAS based authentication - including Kerberos against ActiveDirectory
    - How to configure LDAP with ActiveDirectory and OpenLDAP
Regards

Andy

hsantander
Champ in-the-making
Champ in-the-making
Where can I find the information you mention about LDAP in Enterprise version?

Thanks