This product represents modified version of the ACASUserFolder

The following changes are implemented:

a. The ACASUserFolder performs auto redirect only if a user doesn't have
privileges to access a resource. In standard ACASUserFolder product when
auto redirect future is on , the ACASUserFolder always redirect an user to 
CAS login page.
        
b. Implemented CAS SSO mechanism on the EIONET applications has capability to
automatically recognizes if the user is already logged in into an EIONET application 
so whatever user access protected or unprotected resource on another application 
he will be automatically logged in.Because of that feature this product sends 
an custom cookie named "eionetCasLogin" to the client browser in order 
to inform other applications that user is logged in/out to/from CAS server.
        
c. A new property on the ACASUserFolder management screen "EIONET login cookie domain " that
represents the domain for the "eionetCasLogin" cookie.


If the ACASUserFolder need to be installed in the root Zope folder, than GroupUserFolder
may be used in order to support multiple user sources, one common User folder with the 
Zope administrators and one with CDR users.
        
        
        
The following parts of the CDR need to modified:
        
        
1. A standard_html_header need to contains following code in the head section of the index_html page. 
        <dtml-if expr="REQUEST.AUTHENTICATED_USER.getUserName()  == 'Anonymous User'"> 
	       <script type="text/javascript">
                        var  redirectTo = '<dtml-var expr="REQUEST.URL" url_quote>';
                        var  casLoginUrl = '<dtml-var expr="PATH_TO_THE_ACASUSERFOLDER.cuf_login_url">';
			function get_cookie( cookie_name )
			{
			  var results = document.cookie.match ( cookie_name + '=(.*?)(;|$)' );				
			  if ( results )
			    return ( unescape ( results[1] ) );
			  else
			    return null;
			}
			eionetLoginCookieValue = get_cookie("eionetCasLogin");
			if (eionetLoginCookieValue != null && eionetLoginCookieValue == "loggedIn"){	
				window.location= casLoginUrl + "?service=" + redirectTo;
			}
	       </script>
        </dtml-if>

2. Login    
    Login link contains two parts log:
        casLoginUrl = url of the CAS login servlet (you will get with PATH_TO_THE_ACASUSERFOLDER.cuf_login_url) 
        homeUrl = quoted URL of the application home
    So login link should looks like:
     <li><a href="%s?service=%s">Login</a></li>""" % (casLoginUrl,homeUrl)            
        
3. Logout  
    To logout from the CAS and local application you need to call "cas_complete_logout"
    function from the ACASUserFolder which is public available.(PATH_TO_THE_ACASUSERFOLDER.cas_complete_logout)    
        
Note: PATH_TO_THE_ACASUSERFOLDER is the path expression which represents a path to the ACASUserFolder instance
      inside Zope.                 
            
         
