Index: main/plugin-web/i18n/messages_en.xml
===================================================================
--- main/plugin-web/i18n/messages_en.xml	(revision 29736)
+++ main/plugin-web/i18n/messages_en.xml	(working copy)
@@ -1932,7 +1932,7 @@
     <message key="PLUGINS_WEB_TOOL_SITEMAP_SITEMAPTOOL_ERROR_DELETION_RIGHT">you do not have the right to delete page </message>
     <message key="PLUGINS_WEB_TOOL_SITEMAP_SITEMAPTOOL_ERROR_CREATION_RIGHT">you do not have the right to create page under page </message>
     <message key="PLUGINS_WEB_TOOL_SITEMAP_SITEMAPTOOL_ERROR_CREATION_RIGHT_SITEMAP_ROOT">you do not have the right to create page sitemap root</message>
-    
+
 	<message key="PLUGINS_WEB_TOOL_CONTENT_CONTENTTOOL_EXTERNAL">The content you try to open belongs to another website managed by Ametys, it is a read-only content. Connect to that website in Ametys to edit this content.</message>
     <message key="PLUGINS_WEB_TOOL_CONTENT_CONTENTTOOL_SHARED">The content you're viewing comes from the sharing of another content, therefore you can't modify it. Please open the original content to be able to edit it.</message>
 	
@@ -2377,5 +2377,14 @@
 
     <message key="PLUGINS_WEB_RSS_COMMENTS_DESCRIPTION">Last comments on {content}</message>
     <message key="PLUGINS_WEB_RSS_COMMENTS_LABEL">Comments RSS feed</message>
+    
+    <!-- Captcha Site Configuration -->
+    <message key="PLUGIN_WEB_CAPTCHA_DISPLAY_LABEL">Display</message>
+    <message key="PLUGIN_WEB_CAPTCHA_DISPLAY_DESC">Choose if you want to display the image's text everytime, never or just on public pages.</message>
+    <message key="PLUGIN_WEB_CAPTCHA_DISPLAY_NEVER">Never</message>
+    <message key="PLUGIN_WEB_CAPTCHA_DISPLAY_RESTRICTED">Only public pages</message>
+    <message key="PLUGIN_WEB_CAPTCHA_DISPLAY_ALWAYS">Always</message>
+    <message key="PLUGIN_WEB_CAPTCHA_DISPLAY_CATEGORY">Management of the form</message>
+    <message key="PLUGIN_WEB_CAPTCHA_DISPLAY_GROUP">Image's text</message>
 </catalogue>
 	
\ No newline at end of file
Index: main/plugin-web/i18n/messages_fr.xml
===================================================================
--- main/plugin-web/i18n/messages_fr.xml	(revision 29736)
+++ main/plugin-web/i18n/messages_fr.xml	(working copy)
@@ -1929,12 +1929,21 @@
 	<message key="PLUGINS_WEB_TOOL_SITEMAP_SITEMAPTOOL_ERROR_SITES">Une erreur est survenue : impossible de récupérer la liste des sites</message>
 	<message key="PLUGINS_WEB_TOOL_SITEMAP_SITEMAPTOOL_ERROR_LANGUAGES">Une erreur est survenue : impossible de récupérer la liste des langues disponibles pour ce site</message>
 	<message key="PLUGINS_WEB_TOOL_SITEMAP_SITEMAPTOOL_ERROR_MOVE">Une erreur est survenue: la page n'a pas été déplacée. Vérifiez que vous possédez les droits suffisants sur la page à déplacer ET sur la page cible.</message>
+<<<<<<< .mine
+	<message key="PLUGINS_WEB_TOOL_SITEMAP_SITEMAPTOOL_ERROR_INSUFFICIENT_RIGHTS">Déplacement impossible</message>
+    <message key="PLUGINS_WEB_TOOL_SITEMAP_SITEMAPTOOL_ERROR_INSUFFICIENT_RIGHTS_DESC">Vos droits sont insuffisants pour effectuer ce déplacement: </message>
+    <message key="PLUGINS_WEB_TOOL_SITEMAP_SITEMAPTOOL_ERROR_DELETION_RIGHT">vous ne possédez pas le droit de suppression sur la page </message>
+    <message key="PLUGINS_WEB_TOOL_SITEMAP_SITEMAPTOOL_ERROR_CREATION_RIGHT">vous ne possédez pas le droit de création sur la page </message>
+	<message key="PLUGINS_WEB_TOOL_SITEMAP_SITEMAPTOOL_ERROR_CREATION_RIGHT_SITEMAP_ROOT">vous ne possédez pas le droit de création à la racine du plan du site</message>
+	
+=======
 	<message key="PLUGINS_WEB_TOOL_SITEMAP_SITEMAPTOOL_ERROR_INSUFFICIENT_RIGHTS">Déplacement impossible</message>
     <message key="PLUGINS_WEB_TOOL_SITEMAP_SITEMAPTOOL_ERROR_INSUFFICIENT_RIGHTS_DESC">Vos droits sont insuffisants pour effectuer ce déplacement: </message>
     <message key="PLUGINS_WEB_TOOL_SITEMAP_SITEMAPTOOL_ERROR_DELETION_RIGHT">vous ne possédez pas le droit de suppression sur la page </message>
     <message key="PLUGINS_WEB_TOOL_SITEMAP_SITEMAPTOOL_ERROR_CREATION_RIGHT">vous ne possédez pas le droit de création sur la page </message>
 	<message key="PLUGINS_WEB_TOOL_SITEMAP_SITEMAPTOOL_ERROR_CREATION_RIGHT_SITEMAP_ROOT">vous ne possédez pas le droit de création à la racine du plan du site</message>
     
+>>>>>>> .r29736
 	<message key="PLUGINS_WEB_TOOL_CONTENT_CONTENTTOOL_EXTERNAL">Le contenu que vous visualisez appartient à un autre site, vous êtes donc en Lecture seule. Utilisez le CMS du site correspondant pour modifier ce contenu.</message>
 	<message key="PLUGINS_WEB_TOOL_CONTENT_CONTENTTOOL_SHARED">Le contenu que vous visualisez est issu du partage d'un autre contenu, vous êtes donc en lecture seule. Ouvrez le contenu original pour pouvoir le modifier.</message>
 	
@@ -2379,5 +2388,15 @@
 	
     <message key="PLUGINS_WEB_RSS_COMMENTS_DESCRIPTION">Derniers commentaires sur {content}</message>
     <message key="PLUGINS_WEB_RSS_COMMENTS_LABEL">Flux RSS des commentaires</message>
+    
+    <!-- Captcha Site Configuration -->
+    <message key="PLUGIN_WEB_CAPTCHA_DISPLAY_LABEL">Affichage</message>
+    <message key="PLUGIN_WEB_CAPTCHA_DISPLAY_DESC">Choisir si vous voulez afficher le texte de l'image tout le temps, sur les pages publiques ou jamais.</message>
+    <message key="PLUGIN_WEB_CAPTCHA_DISPLAY_NEVER">Jamais</message>
+    <message key="PLUGIN_WEB_CAPTCHA_DISPLAY_RESTRICTED">Seulement sur les pages publiques</message>
+    <message key="PLUGIN_WEB_CAPTCHA_DISPLAY_ALWAYS">Toujours</message>
+    <message key="PLUGIN_WEB_CAPTCHA_DISPLAY_CATEGORY">Gestion des formulaires</message>
+    <message key="PLUGIN_WEB_CAPTCHA_DISPLAY_GROUP">Texte de l'image</message>
+    
 </catalogue>
 	
\ No newline at end of file
Index: main/plugin-web/plugin.xml
===================================================================
--- main/plugin-web/plugin.xml	(revision 29736)
+++ main/plugin-web/plugin.xml	(working copy)
@@ -1419,7 +1419,7 @@
                 <right id="Web_Rights_Page_Delete">
                     <label>PLUGINS_WEB_RIGHTS_PAGE_DELETE_LABEL</label>
                     <description>PLUGINS_WEB_RIGHTS_PAGE_DELETE_DESCRIPTION</description>
-                    <category>PLUGINS_WEB_RIGHTS_SITEMAP_CATEGORY</category>
+        			<category>PLUGINS_WEB_RIGHTS_SITEMAP_CATEGORY</category>
                 </right>
             </extension>
             
@@ -1833,7 +1833,7 @@
 					<file>js/org/ametys/web/widgets/SiteSitemapWidget.i18n.js</file>
 					<file>js/org/ametys/web/widgets/SitesWidget.i18n.js</file>
 					<file>js/org/ametys/web/widgets/SitesTreeWidget.i18n.js</file>
-                    <file>js/org/ametys/web/helper/ChooseContentBySearch.i18n.js</file>
+					<file>js/org/ametys/web/helper/ChooseContentBySearch.i18n.js</file>
 					<file>js/org/ametys/web/widgets/SelectContentWidget.i18n.js</file>
 					<file>js/org/ametys/web/widgets/ExplorerFolderWidget.i18n.js</file>
 					<file>js/org/ametys/web/widgets/ResourceFileWidget.i18n.js</file>
@@ -4870,6 +4870,7 @@
 						<widget>textarea</widget>
 					</cms:metadata>
 
+
 					<cms:metadata name="illustration" type="composite">
 						<label i18n="true">CONTENT_ARTICLE_ILLUSTRATION</label>
 						<description i18n="true">CONTENT_ARTICLE_ILLUSTRATION_DESC</description>
@@ -4923,10 +4924,10 @@
 						<cms:metadata-ref name="document-subtitle" />
 						<cms:metadata-ref name="illustration">
 							<cms:metadata-ref name="image" />
-							<cms:metadata-ref name="alt-text" />
-						</cms:metadata-ref>
+                            <cms:metadata-ref name="alt-text" />
+                        </cms:metadata-ref>
 						<cms:metadata-ref name="abstract" />
-						<cms:metadata-ref name="content" />
+                        <cms:metadata-ref name="content" />
 						<cms:metadata-ref name="comment" />
 						<cms:metadata-ref name="contact">
 							<cms:metadata-ref name="name" />
@@ -4942,7 +4943,7 @@
 						<cms:metadata-ref name="document-subtitle" />
 						<cms:metadata-ref name="illustration">
 							<cms:metadata-ref name="image" />
-							<cms:metadata-ref name="alt-text" />
+                            <cms:metadata-ref name="alt-text" />
 						</cms:metadata-ref>
 						<cms:metadata-ref name="abstract" />
 						<cms:metadata-ref name="content" />
@@ -4999,7 +5000,7 @@
 						<cms:metadata-ref name="document-subtitle" />
 						<cms:metadata-ref name="illustration">
 							<cms:metadata-ref name="image" />
-							<cms:metadata-ref name="alt-text" />
+                            <cms:metadata-ref name="alt-text" />
 						</cms:metadata-ref>
 						<cms:metadata-ref name="abstract" />
 						<cms:metadata-ref name="content" />
@@ -9254,4 +9255,43 @@
                        class="org.ametys.web.tags.observers.TagDeletedObserver"/>
         </extensions>
     </feature>
+    
+    <feature name="org.ametys.web.captcha">
+        <extensions>
+            <extension point="org.ametys.web.site.SiteConfigurationExtensionPoint"
+                       id="org.ametys.web.captcha.param">
+                <param id="display-captcha" type="string">
+                    <label i18n="true">PLUGIN_WEB_CAPTCHA_DISPLAY_LABEL</label>
+                    <description i18n="true">PLUGIN_WEB_CAPTCHA_DISPLAY_DESC</description>
+                    <enumeration>
+                        <entry>
+                            <label i18n="true">PLUGIN_WEB_CAPTCHA_DISPLAY_NEVER</label>
+                            <value>never</value>
+                        </entry>
+                        <entry>
+                            <label i18n="true">PLUGIN_WEB_CAPTCHA_DISPLAY_RESTRICTED</label>
+                            <value>restricted</value>
+                        </entry>
+                        <entry>
+                            <label i18n="true">PLUGIN_WEB_CAPTCHA_DISPLAY_ALWAYS</label>
+                            <value>always</value>
+                        </entry>
+                    </enumeration>
+                    <category i18n="true">PLUGIN_WEB_CAPTCHA_DISPLAY_CATEGORY</category>
+                    <group i18n="true">PLUGIN_WEB_CAPTCHA_DISPLAY_GROUP</group>
+                    <default-value>restricted</default-value>
+                </param>
+            </extension>
+        </extensions>
+    </feature>
+    
+    <!-- InputData for user information -->
+    <feature name="inputdata.UserInfo">
+        <extensions>
+            <extension point="org.ametys.web.inputdata.InputDataExtensionPoint"
+                       id="org.ametys.web.inputdata.UserInputData"
+                       class="org.ametys.web.inputdata.UserInputData"/>
+        </extensions>
+    </feature>
+    
 </plugin>
Index: main/plugin-web/pages/services/user-signup/signup_3.5.xsl
===================================================================
--- main/plugin-web/pages/services/user-signup/signup_3.5.xsl	(revision 29736)
+++ main/plugin-web/pages/services/user-signup/signup_3.5.xsl	(working copy)
@@ -279,7 +279,8 @@
     
     <xsl:template name="temp-signup-fields">
         <input type="hidden" name="signup" value="true"/>
-		
+		<input type="hidden" name="page-id" value="{ametys:pageId()}"/>
+        
         <xsl:call-template name="lastname-field">
             <xsl:with-param name="value" select="/user-signup/@lastname"/>
         </xsl:call-template>
@@ -292,7 +293,9 @@
             <xsl:with-param name="value" select="/user-signup/@email"/>
         </xsl:call-template>
         
-        <xsl:call-template name="captcha-field"/>
+        <xsl:if test="/user-signup/has-captcha = 'true'">
+            <xsl:call-template name="captcha-field"/>
+        </xsl:if>
         
         <xsl:if test="normalize-space($tos-page-id) != ''">
             <xsl:call-template name="tos-field">
Index: main/plugin-web/src/org/ametys/web/inputdata/UserInputData.java
===================================================================
--- main/plugin-web/src/org/ametys/web/inputdata/UserInputData.java	(revision 0)
+++ main/plugin-web/src/org/ametys/web/inputdata/UserInputData.java	(revision 0)
@@ -0,0 +1,98 @@
+/*
+ *  Copyright 2014 Anyware Services
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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.ametys.web.inputdata;
+
+import org.apache.avalon.framework.context.Context;
+import org.apache.avalon.framework.context.ContextException;
+import org.apache.avalon.framework.context.Contextualizable;
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.avalon.framework.service.Serviceable;
+import org.apache.cocoon.ProcessingException;
+import org.apache.cocoon.components.ContextHelper;
+import org.apache.cocoon.environment.Request;
+import org.apache.cocoon.xml.AttributesImpl;
+import org.apache.cocoon.xml.XMLUtils;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+
+import org.ametys.runtime.user.UsersManager;
+import org.ametys.web.WebConstants;
+import org.ametys.web.pageaccess.PageAccessManager;
+import org.ametys.web.repository.page.Page;
+import org.ametys.web.repository.site.Site;
+
+public class UserInputData implements InputData, Serviceable, Contextualizable
+{
+    protected PageAccessManager _accessManager;
+    
+    protected UsersManager _userManagerFO;
+    
+    protected Context _context;
+    
+    public void service(ServiceManager manager) throws ServiceException
+    {
+        _accessManager = (PageAccessManager) manager.lookup(PageAccessManager.ROLE);
+        _userManagerFO = (UsersManager) manager.lookup(UsersManager.ROLE + ".FO");
+    }
+
+    public void contextualize(Context context) throws ContextException
+    {
+        _context = context;
+    }
+
+    public boolean isCacheable(Site site, Page page)
+    {
+        if (page != null)
+        {
+            return !_accessManager.getAccessInfo(page).isRestricted();
+        }
+        else
+        {
+            return true;
+        }
+    }
+
+    public void toSAX(ContentHandler handler) throws SAXException, ProcessingException
+    {
+        Request request = ContextHelper.getRequest(_context);
+        
+        String login = (String) request.getAttribute(WebConstants.FO_LOGIN);
+        Page page = (Page) request.getAttribute(Page.class.getName());
+        
+        handler.startDocument();
+        XMLUtils.startElement(handler, "userInfo");
+        
+        AttributesImpl attrs = new AttributesImpl();
+        if (page != null && _accessManager.getAccessInfo(page).isRestricted() && login != null)
+        {
+            attrs.addCDATAAttribute("state", "connected");
+        }
+        else
+        {
+            attrs.addCDATAAttribute("state", "unknown");
+        }
+        
+        XMLUtils.createElement(handler, "userState", attrs);
+        
+        _userManagerFO.saxUser(login, handler);
+        
+        XMLUtils.endElement(handler, "userInfo");
+
+        handler.endDocument();
+    }
+
+}
Index: main/plugin-web/src/org/ametys/web/usermanagement/UserSignupAction.java
===================================================================
--- main/plugin-web/src/org/ametys/web/usermanagement/UserSignupAction.java	(revision 29736)
+++ main/plugin-web/src/org/ametys/web/usermanagement/UserSignupAction.java	(working copy)
@@ -22,6 +22,8 @@
 import java.util.Map;
 import java.util.Set;
 
+import javax.jcr.Repository;
+
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
@@ -32,6 +34,7 @@
 import org.apache.cocoon.environment.SourceResolver;
 import org.apache.commons.lang.StringUtils;
 
+import org.ametys.plugins.repository.AmetysObjectResolver;
 import org.ametys.runtime.captcha.CaptchaHelper;
 import org.ametys.runtime.user.CredentialsAwareUsersManager;
 import org.ametys.runtime.user.ModifiableUsersManager;
@@ -40,6 +43,11 @@
 import org.ametys.runtime.util.parameter.Errors;
 import org.ametys.runtime.util.parameter.Parameter;
 import org.ametys.runtime.util.parameter.ParameterHelper.ParameterType;
+import org.ametys.web.pageaccess.PageAccessManager;
+import org.ametys.web.repository.page.Page;
+import org.ametys.web.site.SiteConfigurationExtensionPoint;
+import org.ametys.web.skin.SkinsManager;
+import org.ametys.web.synchronization.SynchronizeComponent;
 
 import com.google.common.collect.ArrayListMultimap;
 import com.google.common.collect.Multimap;
@@ -59,12 +67,24 @@
     /** The front-office user manager. */
     protected UsersManager _foUsersManager;
     
+    /** The page access manager */
+    protected PageAccessManager _accessManager;
+    
+    /** The site configuration EP. */
+    protected SiteConfigurationExtensionPoint _siteConfiguration;
+    
+    /** The Ametys Resolver */
+    protected AmetysObjectResolver _resolver;
+    
     @Override
     public void service(ServiceManager serviceManager) throws ServiceException
     {
         super.service(serviceManager);
         _userSignupManager = (UserSignupManager) serviceManager.lookup(UserSignupManager.ROLE);
         _foUsersManager = (UsersManager) serviceManager.lookup(UsersManager.ROLE + ".FO");
+        _siteConfiguration = (SiteConfigurationExtensionPoint) serviceManager.lookup(SiteConfigurationExtensionPoint.ROLE);
+        _accessManager = (PageAccessManager) serviceManager.lookup(PageAccessManager.ROLE);
+        _resolver = (AmetysObjectResolver) serviceManager.lookup(AmetysObjectResolver.ROLE);
     }
     
     @Override
@@ -157,21 +177,26 @@
         String firstName = request.getParameter("firstname");
         String lastName = request.getParameter("lastname");
         String email = request.getParameter("email");
-        String captchaValue = request.getParameter("captcha");
-        String captchaKey = request.getParameter("captcha-key");
         String tos = request.getParameter("tos");
         String tosPageId = parameters.getParameter("tos-page-id", "");
         Map<String, String> additionalFields = getAdditionalValues(request);
         
-        // Validate the input
-        if (StringUtils.isBlank(captchaKey) || StringUtils.isBlank(captchaValue))
-        {
-            errors.put("captcha", new I18nizableText("plugin.web", "PLUGINS_WEB_USER_SIGNUP_FORM_ERROR_INVALID_CAPTCHA"));
-        }
-        else if (!CaptchaHelper.checkAndInvalidate(captchaKey, captchaValue))
-        {
-            errors.put("captcha", new I18nizableText("plugin.web", "PLUGINS_WEB_USER_SIGNUP_FORM_ERROR_INVALID_CAPTCHA"));
+        if (_hasCaptcha(request))
+        {   
+            String captchaValue = request.getParameter("captcha");
+            String captchaKey = request.getParameter("captcha-key");
+
+            // Validate the input
+            if (StringUtils.isBlank(captchaKey) || StringUtils.isBlank(captchaValue))
+            {
+                errors.put("captcha", new I18nizableText("plugin.web", "PLUGINS_WEB_USER_SIGNUP_FORM_ERROR_INVALID_CAPTCHA"));
+            }
+            else if (!CaptchaHelper.checkAndInvalidate(captchaKey, captchaValue))
+            {
+                errors.put("captcha", new I18nizableText("plugin.web", "PLUGINS_WEB_USER_SIGNUP_FORM_ERROR_INVALID_CAPTCHA"));
+            }
         }
+        
         if (StringUtils.isNotEmpty(tosPageId) && !"true".equals(tos))
         {
             errors.put("tos", new I18nizableText("plugin.web", "PLUGINS_WEB_USER_SIGNUP_FORM_ERROR_TOS_NOT_CHECKED"));
@@ -311,4 +336,25 @@
         return additionalFields;
     }
     
+    private boolean _hasCaptcha(Request request)
+    {
+        String pageId = request.getParameter("page-id");
+        
+        Page page = _resolver.resolveById(pageId);
+        String siteName = page.getSiteName();
+        
+        String displayCaptcha = _siteConfiguration.getValueAsString(siteName, "display-captcha");
+        boolean hasCaptcha;
+        
+        if (displayCaptcha.equals("restricted")) 
+        {
+            hasCaptcha = !_accessManager.getAccessInfo(page).isRestricted(); 
+        }
+        else 
+        {
+            hasCaptcha = displayCaptcha.equals("always");
+        }
+        
+        return hasCaptcha;
+    }
 }
Index: main/plugin-web/src/org/ametys/web/usermanagement/UserSignupGenerator.java
===================================================================
--- main/plugin-web/src/org/ametys/web/usermanagement/UserSignupGenerator.java	(revision 29736)
+++ main/plugin-web/src/org/ametys/web/usermanagement/UserSignupGenerator.java	(working copy)
@@ -39,6 +39,7 @@
 import org.ametys.runtime.user.UsersManager;
 import org.ametys.runtime.util.I18nizableText;
 import org.ametys.web.WebConstants;
+import org.ametys.web.pageaccess.PageAccessManager;
 import org.ametys.web.repository.page.Page;
 import org.ametys.web.site.SiteConfigurationExtensionPoint;
 import org.ametys.web.skin.Skin;
@@ -52,6 +53,8 @@
  */
 public class UserSignupGenerator extends ServiceableGenerator
 {
+    /** The page access manager */
+    protected PageAccessManager _accessManager;
     
     /** The front-office users manager. */
     protected UsersManager _foUsersManager;
@@ -83,6 +86,7 @@
         _skinManager = (SkinsManager) serviceManager.lookup(SkinsManager.ROLE);
         _synchronizeComponent = (SynchronizeComponent) serviceManager.lookup(SynchronizeComponent.ROLE);
         _repository = (Repository) serviceManager.lookup(Repository.class.getName());
+        _accessManager = (PageAccessManager) serviceManager.lookup(PageAccessManager.ROLE);
     }
     
     @Override
@@ -144,6 +148,8 @@
         
         saxWarnings(publicSignup, signupPage, pwdChangePage, userMainPrefsPage);
         
+        XMLUtils.createElement(contentHandler, "has-captcha", _hasCaptcha(request) ? "true" : "false");
+        
         XMLUtils.endElement(contentHandler, "user-signup");
         
         contentHandler.endDocument();
@@ -305,4 +311,24 @@
         }
     }
     
+    private boolean _hasCaptcha(Request request)
+    {
+        Page page = (Page) request.getAttribute(Page.class.getName());        
+        String siteName = page.getSiteName();
+        
+        String displayCaptcha = _siteConfiguration.getValueAsString(siteName, "display-captcha");
+        boolean hasCaptcha;
+        
+        if (displayCaptcha.equals("restricted")) 
+        {
+            hasCaptcha = !_accessManager.getAccessInfo(page).isRestricted(); 
+        }
+        else 
+        {
+            hasCaptcha = displayCaptcha.equals("always");
+        }
+        
+        return hasCaptcha;
+    }
+    
 }
Index: main/plugin-web/stylesheets/helper/common_3.3.xsl
===================================================================
--- main/plugin-web/stylesheets/helper/common_3.3.xsl	(revision 29736)
+++ main/plugin-web/stylesheets/helper/common_3.3.xsl	(working copy)
@@ -66,5 +66,14 @@
 	       	</div>
        	</xsl:if>
     </xsl:template>
+        
+    <xsl:template name="fill-user-input">
+        <xsl:param name="id"/>
+        <xsl:param name="field"/>
+    
+        <script type="text/javascript">
+            window.ametysUser &amp;&amp; window.ametysUser.fill("<xsl:value-of select="$id"/>", "<xsl:value-of select="$field"/>");
+        </script>    
+    </xsl:template>
     
 </xsl:stylesheet>
Index: main/workspace-web/stylesheets/wrapper.xsl
===================================================================
--- main/workspace-web/stylesheets/wrapper.xsl	(revision 29736)
+++ main/workspace-web/stylesheets/wrapper.xsl	(working copy)
@@ -54,6 +54,8 @@
 				<xsl:call-template name="head-js-jquery"/>	                	
 				<xsl:call-template name="head-js-pirobox"/>	                	
                 
+                <xsl:call-template name="head-js-user"/>                      
+                
 				<xsl:call-template name="head-css-jquery"/>	                	
 				<xsl:call-template name="head-css-pirobox"/>
                 
Index: main/workspace-web/stylesheets/template-default.xsl
===================================================================
--- main/workspace-web/stylesheets/template-default.xsl	(revision 29736)
+++ main/workspace-web/stylesheets/template-default.xsl	(working copy)
@@ -40,7 +40,7 @@
     </xsl:template>
     
     <xsl:template name="head-css-jquery">
-		<link type="text/css" href="{$uri-prefix}/plugins/jquery-ui/resources/css/ui-lightness/jquery-ui.css" rel="stylesheet" media="screen, print" />
+        <link type="text/css" href="{$uri-prefix}/plugins/jquery-ui/resources/css/ui-lightness/jquery-ui.css" rel="stylesheet" media="screen, print" />
     </xsl:template>
    
     <xsl:template name="head-js-pirobox">
@@ -69,4 +69,36 @@
         <xsl:if test="position() = last()"><xsl:text>last</xsl:text></xsl:if>
     </xsl:template>
     
+    <xsl:template name="head-js-user">
+        <script type="text/javascript">
+            ametysUser = null;
+            if ('<xsl:value-of select="/cms/inputData/userInfo/userState/@state" />' == 'connected')
+            {
+	            ametysUser = {
+	                "login":'<xsl:value-of select="/cms/inputData/userInfo/user/@login" />',
+	                "firstname": '<xsl:value-of select="/cms/inputData/userInfo/user/firstname" />',
+	                "lastname": '<xsl:value-of select="/cms/inputData/userInfo/user/lastname" />',
+	                "fullname": '<xsl:choose><xsl:when test="/cms/inputData/userInfo/user/firstname"><xsl:value-of select="/cms/inputData/userInfo/user/firstname" /><xsl:if test="/cms/inputData/userInfo/user/lastname"><xsl:value-of select="concat(' ', /cms/inputData/userInfo/user/lastname)" /></xsl:if></xsl:when><xsl:otherwise><xsl:value-of select="/cms/inputData/userInfo/user/lastname" /></xsl:otherwise></xsl:choose>',
+	                "email":'<xsl:value-of select="/cms/inputData/userInfo/user/email" />',
+	                
+	                fill: function(id, field, callback)
+	                {
+	                   if (this[field])
+                        {
+	                        var input = document.getElementById(id);
+	                        if (!input.value)
+	                        {
+	                            input.value = this[field];
+	                            if (typeof callback == "function")
+	                            {
+	                               callback(id, input, this[field]);
+	                            }
+	                        }
+	                    }
+	                }
+	            }
+            }
+        </script>
+    </xsl:template>
+    
 </xsl:stylesheet>
\ No newline at end of file
