cancel
Showing results for 
Search instead for 
Did you mean: 

change initial page

gerard
Champ in-the-making
Champ in-the-making
Hi, how I can change the initial page (user guest) by to login page?.


Thanks.
8 REPLIES 8

kevinr
Star Contributor
Star Contributor
You can disable Guest access to the system - which means all users will see the login page as the first page.

http://wiki.alfresco.com/wiki/Repository_Configuration

The file you want to override is authentication-services-context.xml and the section you want to override is:

    <bean id="authenticationComponentImpl" class="org.alfresco.repo.security.authentication.AuthenticationComponentImpl">
        <property name="authenticationDao">
            <ref bean="authenticationDao" />
        </property>
        <property name="authenticationManager">
            <ref bean="authenticationManager" />
        </property>
        <property name="allowGuestLogin">
            <value>true</value>
        </property>
    </bean>

So following the configuration guide, you want to create a file called:
<extension>/alfresco/extension/custom-services-context.xml
where <extension> is going to be something like:
/tomcat/shared/classes - depending on your installation!
edit the file to read as:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>
    <bean id="authenticationComponentImpl" class="org.alfresco.repo.security.authentication.AuthenticationComponentImpl">
        <property name="authenticationDao">
            <ref bean="authenticationDao" />
        </property>
        <property name="authenticationManager">
            <ref bean="authenticationManager" />
        </property>
        <property name="allowGuestLogin">
            <value>false</value>
        </property>
    </bean>
</beans>

Hope this helps,

Kevin

gerard
Champ in-the-making
Champ in-the-making
Hi Kevin, thanks for your help. Now it shows the login page but when I login with the user admin, it returns to the same longin page!!!!


Thanks.

kevinr
Star Contributor
Star Contributor
Do you mean you can't login at all? Are you executing the Alfresco server from the same folder as usual? As this is a common problem if you start Alfresco from a different start directory.

Thanks,

Kevin

gerard
Champ in-the-making
Champ in-the-making
Yes, I executing the Alfresco server from the same folder. I place custom-services-context.xml into "<path>/server/default/conf/alfresco/extension" , then I start the server whit alf_start.

thanks.

gavinc
Champ in-the-making
Champ in-the-making

gerard
Champ in-the-making
Champ in-the-making
Hi kevinr, now it works well. Tell me:  Could I start directly a sesion whit a defined user (same guest user)???

Thanks.

kevinr
Star Contributor
Star Contributor
No currently the only user who can be auto-logged in using the default authentication is the Guest user. You can use passthrough NTML authentication or similar (if that is appropriate for your setup) to get auto-login.

Thanks,

Kevin

piman31415
Champ in-the-making
Champ in-the-making
FYI, to get this to work in Alfresco 2.90B (on Linux FC8/tomcat), I had to change the bean id to be "authenticationComponent", not "authenticationComponentImpl" (the rest, including the class name, was as stated in the earlier post.  So, my bean id line in the custom-services-context.xml is:


  <bean id="authenticationComponent"
            class="org.alfresco.repo.security.authentication.AuthenticationComponentImpl">