Now I'm embarrassed for posting that question. I see there is a SecurePageLink
class that already does that I need...and I see from that source how I can 
create
the LinkSecurityCheck if I wanted to do it myself.

Thanks Warren!

I've got it working now.  Like everything else in Wicket, that was really easy 
:>

Chris


Christopher L Merrill wrote:
Warren Bell wrote:
 > Try securing the link on your HomePage and do not secure the HomePage
 > itself. The link has to implement ISecureComponent.

Warren,

I've followed your suggestion but the link is still rendering, so I'm still
missing something.

First, I made my own component MyPageLink that extends PageLink and implements ISecureComponent. I implemented the ISecureComponent methods by simply calling into the corresponding methods in SecureComponentHelper, as suggested in the
ISecureComponent docs.

I added the link in the home page like this:
  add(new MyPageLink("link", Page2.class));

Maybe I needed to do more in the implementation - I see that getSecurityCheck() in MyPageLink is returning null...which the results in WaspAuthorizationStrategy.
isActionAuthorized("link", "RENDER") returning true.

Who should be calling MyPageLink.setSecurityCheck()? Me? I'm not sure what
I should be passing to it?


Any suggestions?

TIA!
Chris




--
------------------------------------------------------------------------ -
Chris Merrill                           |  Web Performance, Inc.
ch...@webperformance.com                |  http://webperformance.com
919-433-1762                            |  919-845-7601

Website Load Testing and Stress Testing Software & Services
------------------------------------------------------------------------ -

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to