You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Neil McT <ne...@yahoo.co.uk> on 2008/08/12 23:24:21 UTC

Markup inheritance for secure and non-secure pages

Hi folks,

I'm new to Wicket so please forgive me if I ask something incredibly dumb :)

I've just started using Wicket and am enjoying it very much. I'm putting
together an application using SWARM / WASP for my authentication /
authorisation and would like to use markup inheritance to give a consistent
look and feel for both secure AND non-secure pages.. and this is where I've
run into my first problem.

I would like all off my pages to extend some base-page however my secure
pages all extend  SecureWebPage. So basically my secure and non-secure web
pages cannot extend the same base page.

As far as I can see my options are....

1) Rather than extend SecureWebPage my secure pages can implement
ISecurePage, however this would require quite a few additional methods to be
implemented (and duplicated) across my secure pages.

2) Rather than go for a page-based layout I could go for a single page with
a panel-based layout and manage security on a panel-by-panel basis. However,
I prefer the navigation aspect of the page-based layout and I prefer to
assign permissions in SWARM on a page-by-page basis (and find it easier /
more intuitive to authenticate on a page-basis).

Am I missing something simple here? Does anyone have any other suggestions?

Any help much appreciated,

Neil. 
-- 
View this message in context: http://www.nabble.com/Markup-inheritance-for-secure-and-non-secure-pages-tp18952852p18952852.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: Markup inheritance for secure and non-secure pages

Posted by Neil McT <ne...@yahoo.co.uk>.
Ahh... I was digging about and found this nugget 
http://www.nabble.com/wicket-security%2C-everybodyprincipal-and-only-securepages-td15413102.html#a15419077
here 

"......since you probably want every page to extend BasePage why not
have a subclass that implements ISecurePage and have all your pages
that should be secure extend that page.
For the implementation of ISecurePage you can simply redirect all
calls to the SecureComponentHelper."

Looks like SecureComponentHelper is the answer to my problems.

Thanks for your help.


Neil McT wrote:
> 
> 
> So, in terms of WASP / SWARM... what is it that makes SecureBasePage
> secure? I.e. it doesn't extend SecureWebPage. I'm assuming, therefore,
> that it implements ISecurePage? 
> 
> ......
> 
> 

-- 
View this message in context: http://www.nabble.com/Markup-inheritance-for-secure-and-non-secure-pages-tp18952852p18953560.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: Markup inheritance for secure and non-secure pages

Posted by Martijn Dashorst <ma...@gmail.com>.
yup. and we make heavy use of SecureComponentHelper (also part of wasp/swarm)

Martijn

On Wed, Aug 13, 2008 at 12:03 AM, Neil McT <ne...@yahoo.co.uk> wrote:
>
>
> So, in terms of WASP / SWARM... what is it that makes SecureBasePage secure?
> I.e. it doesn't extend SecureWebPage. I'm assuming, therefore, that it
> implements ISecurePage?
>
> Thanks - Neil.
>
>
>
>
>
>
>
> Martijn Dashorst wrote:
>>
>> AbstractBasePage extends WebPage
>>
>> SecureBasePage extends AbstractBasePage
>>
>> This is how we do it in our projects.
>>
>> Martijn
>>
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Markup-inheritance-for-secure-and-non-secure-pages-tp18952852p18953397.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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


Re: Markup inheritance for secure and non-secure pages

Posted by Neil McT <ne...@yahoo.co.uk>.

So, in terms of WASP / SWARM... what is it that makes SecureBasePage secure?
I.e. it doesn't extend SecureWebPage. I'm assuming, therefore, that it
implements ISecurePage? 

Thanks - Neil.

 





Martijn Dashorst wrote:
> 
> AbstractBasePage extends WebPage
> 
> SecureBasePage extends AbstractBasePage
> 
> This is how we do it in our projects.
> 
> Martijn
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Markup-inheritance-for-secure-and-non-secure-pages-tp18952852p18953397.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: Markup inheritance for secure and non-secure pages

Posted by Martijn Dashorst <ma...@gmail.com>.
AbstractBasePage extends WebPage

SecureBasePage extends AbstractBasePage

This is how we do it in our projects.

Martijn


On Tue, Aug 12, 2008 at 11:24 PM, Neil McT <ne...@yahoo.co.uk> wrote:
>
> Hi folks,
>
> I'm new to Wicket so please forgive me if I ask something incredibly dumb :)
>
> I've just started using Wicket and am enjoying it very much. I'm putting
> together an application using SWARM / WASP for my authentication /
> authorisation and would like to use markup inheritance to give a consistent
> look and feel for both secure AND non-secure pages.. and this is where I've
> run into my first problem.
>
> I would like all off my pages to extend some base-page however my secure
> pages all extend  SecureWebPage. So basically my secure and non-secure web
> pages cannot extend the same base page.
>
> As far as I can see my options are....
>
> 1) Rather than extend SecureWebPage my secure pages can implement
> ISecurePage, however this would require quite a few additional methods to be
> implemented (and duplicated) across my secure pages.
>
> 2) Rather than go for a page-based layout I could go for a single page with
> a panel-based layout and manage security on a panel-by-panel basis. However,
> I prefer the navigation aspect of the page-based layout and I prefer to
> assign permissions in SWARM on a page-by-page basis (and find it easier /
> more intuitive to authenticate on a page-basis).
>
> Am I missing something simple here? Does anyone have any other suggestions?
>
> Any help much appreciated,
>
> Neil.
> --
> View this message in context: http://www.nabble.com/Markup-inheritance-for-secure-and-non-secure-pages-tp18952852p18952852.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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