cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Becker <jonnybec...@gmx.net>
Subject Flow - Problems "redirecting"
Date Wed, 15 Jun 2005 12:25:40 GMT
Hi,

I've got a flowscript like this:

// This function is called from sitemap when a protected resource is 
requested
function requestProtectedResource(){
    var protectedResource = cocoon.parameters["protected-resource"];
    if(loggedin){
        displayProtectedResource(protectedResource); // display the 
protected page
    }
    else{
      cocoon.sendPage("login"); // redirect to the loginpage
    }
}

My problem:

For example:
- login-page: /login
- protected-pages: /protected/*

If a person (who isn't logged-in) attempts to view a protected page, 
lets say "/protected/secrets", then he is redirected to the login -page. 
The path in the location-bar (the bar in your browser, where the uri is 
displayed) is "/protected/secrets", but I want the path to be "/login".

How can I achieve this "behaviour?

Thanks
Jonny


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message