You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Paul Jackson <pa...@meridianinfo.com> on 2004/05/26 04:32:15 UTC

Denying access to tapestry application

Hi there,

 

I want to be able to deny access to users not on our application. 

Currently we use jcifs to check the ntlm authenication of the user.

After that I want to check the username against the database. 

If the user isn't there then I want to redirect the user to an
'accessDenied' page.

However I'm unsure as to where to put this check and redirection. 

 

Any help appreciated,

 

Paul Jackson
Ph +61 (0)2 8233 7564
Meridian Informatics (www.meridianinfo.com
<http://www.meridianinfo.com/> )
Custom Software for Agile Financial Services

 


Re: Denying access to tapestry application

Posted by tmjee <tm...@hotmail.com>.
Maybe implement PageValidateListener ? Which may hooked up with
acegi-security, to do authentication. Hooked up acegi-security and spring's
application context during setupForRequest, if you are using Spring as
service layer.

regards
tmjee

----- Original Message -----
From: "Eric Schneider" <er...@centralparksoftware.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Tuesday, May 25, 2004 7:43 PM
Subject: Re: Denying access to tapestry application


> Paul,
>
> Create a super class that all of your secure pages extend (for example,
> something named SecurePage.java).   In SecurePage.java override the
> validate() method......
>
> public void validate(IRequestCycle cycle) {
>  super.validate(cycle);
>  User user = ((Visit) getVisit()).getUser();
>  if (user == null) {
>   throw new PageRedirectException("AccessDenied");
>  }
> }
>
> Cheers,
> eric
>
>
> ----- Original Message -----
> From: "Paul Jackson" <pa...@meridianinfo.com>
> To: <ta...@jakarta.apache.org>
> Sent: Tuesday, May 25, 2004 10:32 PM
> Subject: Denying access to tapestry application
>
>
> Hi there,
>
>
>
> I want to be able to deny access to users not on our application.
>
> Currently we use jcifs to check the ntlm authenication of the user.
>
> After that I want to check the username against the database.
>
> If the user isn't there then I want to redirect the user to an
> 'accessDenied' page.
>
> However I'm unsure as to where to put this check and redirection.
>
>
>
> Any help appreciated,
>
>
>
> Paul Jackson
> Ph +61 (0)2 8233 7564
> Meridian Informatics (www.meridianinfo.com
> <http://www.meridianinfo.com/> )
> Custom Software for Agile Financial Services
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Denying access to tapestry application

Posted by Eric Schneider <er...@centralparksoftware.com>.
Paul,

Create a super class that all of your secure pages extend (for example,
something named SecurePage.java).   In SecurePage.java override the
validate() method......

public void validate(IRequestCycle cycle) {
 super.validate(cycle);
 User user = ((Visit) getVisit()).getUser();
 if (user == null) {
  throw new PageRedirectException("AccessDenied");
 }
}

Cheers,
eric


----- Original Message ----- 
From: "Paul Jackson" <pa...@meridianinfo.com>
To: <ta...@jakarta.apache.org>
Sent: Tuesday, May 25, 2004 10:32 PM
Subject: Denying access to tapestry application


Hi there,



I want to be able to deny access to users not on our application.

Currently we use jcifs to check the ntlm authenication of the user.

After that I want to check the username against the database.

If the user isn't there then I want to redirect the user to an
'accessDenied' page.

However I'm unsure as to where to put this check and redirection.



Any help appreciated,



Paul Jackson
Ph +61 (0)2 8233 7564
Meridian Informatics (www.meridianinfo.com
<http://www.meridianinfo.com/> )
Custom Software for Agile Financial Services





---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Java Objects Pass By Reference

Posted by Thijs Suijten <t....@semantica.nl>.
I've got a question about Java Objects in Tapestry Pages.

I've got on big Java Bean containing Search Criteria, this bean is being
filled in the Search Page.

When the user clicks on a List Of Values a new page is activated. I pass one
member field of the big Search Bean to the List Of Values page:

public void submitForm(IRequestCycle cycle)
{
	if(getShowDynamicLov() != null)
	{
		DynamicLov page = (DynamicLov) cycle.getPage("DynamicLov");
		page.setModel(new
DefaultDynamicLovModel(getShowDynamicLov().getPropertyType()));

		//!!Pass one member field of the big Search Bean to the List Of Values
page.
		page.setProperty(getShowDynamicLov());
		cycle.activate(page);
	}
}

This member field is passed by reference. In the List Of Values page the
user selects a item from a list and the member field is updated with the new
value. The user is then send back to the Search Page.

This works just fine in my application and the value is properly updated.

So what's my problem you might ask... Well here it comes.

I know that Tapestry Frees and Lock pages using Object Pooling. It can also
serialize persited data. The member variable I pass to the List Of Values
page is stored there as a persitent property. What if Tapestry serializes my
persited data (for i.e. Load balancing) would my value still be properly
updated? Is this a correct way of passing values or is this not
recommended??

Best regards,
Thijs

PS

I've seen a example in the documentation where a Java Object is retrieved
(getter) at the beginning of a method, then updated. At the end of the
method the Java Object was stored using the setter. From a Java point of
view this is totally useless but it was necessary for Tapestry Load
balancing/serialization.

My question is similar. I pass a value, update it but never call a setter
again. Again from a Java Point of view this would not be necessary but is it
for Tapestry?
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.690 / Virus Database: 451 - Release Date: 22-5-2004


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Denying access to tapestry application

Posted by "Dmitry I. Zubarovsky" <au...@rambler.ru>.
Hello Paul,

You can also use Acegi security for your purpose.
http://acegisecurity.sourceforge.net/

Dima

PJ> Hi there,
PJ> I want to be able to deny access to users not on our application.
PJ> Currently we use jcifs to check the ntlm authenication of the user.
PJ> After that I want to check the username against the database.
PJ> If the user isn't there then I want to redirect the user to an
PJ> 'accessDenied' page.
PJ> However I'm unsure as to where to put this check and redirection.

PJ> Any help appreciated,

 

PJ> Paul Jackson
PJ> Ph +61 (0)2 8233 7564
PJ> Meridian Informatics (www.meridianinfo.com
PJ> <http://www.meridianinfo.com/> )
PJ> Custom Software for Agile Financial Services


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org