yeah, maybe that's a better name after all.

Eelco

On 11/1/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> will renaming allowRender to allowVisible make it easier to understand?
> -Igor
>
>
>
> On 11/1/05, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> >
> > Component does use the enabled flag. It is used to prevent model
> > updates when it is disabled, and for the rest it is meant for doing
> > component specific stuff like with form components automatically
> > adding a disabled attribute (btw, that needs to be fine-tuned a bit
> > based on some remarks Johan gave).
> >
> > The authorization strategy is meant to be global/ application scoped.
> > The actual strategies, e.g. with annotations or some other metadata
> > tech, should be used to bind the security to specific components.
> >
> > I don't agree visible and enabled are the same. Visible in a security
> > context has two meanings: it is either rendered or not (filtered), or
> > - when the allowVisible method throws an exception - it blocks the
> > whole page from rendering. Enabled is meant to both provide a generic
> > means to disallow model updates (because while attributemodifiers can
> > prevent the browser sending data, it is still a potential security
> > leak), and a hook for component specific enabled/ disabled stuff.
> > Furthermore the idea is that a disabled component itself is not
> > reachable, thus a disabled link may never have it's listener method
> > called (I forgot to implement that actually; I'll do that now).
> >
> > Eelco
> >
> >
> > On 11/1/05, Maurice Marrink <[EMAIL PROTECTED]> wrote:
> > > Then i am confused.
> > > Why does the doc state that boolean allowRender is for security purpose,
> > > when we already have isVisible on the component.
> > > And why add an enabled flag if component is not doing anything with it,
> > > but formcomponent suddenly uses it to set a disabled attribute.
> > > Setting a component enabled or disabled was already possible without the
> > > flag if you used an attributemodifier.
> > >
> > > IMO we should keep it simple, for me that means:
> > > Set strategy on the component.
> > > Component has isVisible because you can't use an attributemodifier to do
> > > that.
> > > Use attributemodifiers to set properties like disabled / readonly, the
> > > attributemodifiers can choose to use the securitystrategy or some custom
> > > user implementation.
> > >
> > > This way there is no need for securitysettings to override
> > > componentsettings (except for visible) because there is only one
> > > setting. The one at the component and it can be security or something
> > > else.
> > > Anyway just my 2 cents.
> > >
> > > ________________________________
> > >
> > > Maurice Marrink
> > > www.topicus.nl
> > > -----Original Message-----
> > > From: Eelco Hillenius [mailto:[EMAIL PROTECTED]
> > > Sent: maandag 31 oktober 2005 18:36
> > > To: [email protected]
> > > Subject: Re: [Wicket-develop] security
> > >
> > > Yeah, sorry about that stupid bug.
> > >
> > > However, I still don't understand what you mean. Enabled and rendering
> > > are two different things. Also, the security settings /allways/
> > > override any component setting. That may look like we're doing stuff
> > > double, but it deliberately.
> > >
> > > Eelco
> > >
> > > On 10/31/05, Maurice Marrink < [EMAIL PROTECTED]> wrote:
> > > > Ok, I get that. The point i really was trying to make (i realize i was
> > > > not clear in that in the previous mail) is that you are duplicating
> > > > behavior.
> > > > You made a Boolean for rendering and a flag for enabled, this is
> > > already
> > > > covered in the strategy. So let's use it then.
> > > > It also would have prevented a small but annoying bug you just
> > > > introduced.
> > > > See next mail for that.
> > > >
> > > > ________________________________
> > > >
> > > > Maurice Marrink
> > > > www.topicus.nl
> > > >
> > > > -----Original Message-----
> > > > From: Eelco Hillenius [mailto:[EMAIL PROTECTED]
> > > > Sent: maandag 31 oktober 2005 9:47
> > > > To: [email protected]
> > > > Subject: Re: [Wicket-develop] security
> > > >
> > > > If you want to do it for one/ a couple of components, do it right
> > > > there. In that case there certainly is no need for a generalized
> > > > strategy.
> > > >
> > > > The trick - the next thing to build on top of the basic authorization
> > > > mechanism - is to find some way of adding metadata to your components
> > > > (/ instances) that can be used by a certain authorization strategy. A
> > > > big if/else is clearly not the point of this low-level implementation.
> > > >
> > > > Eelco
> > > >
> > > >
> > > > On 10/31/05, Maurice Marrink <[EMAIL PROTECTED]> wrote:
> > > > > I just noticed a boolean allowRender in Component.
> > > > > According to the doc it is meant for security.
> > > > > I also saw IAuthorizationStrategy which can be set at the
> > > application.
> > > > > IMO it would be better to set an instance of this at the component.
> > > > > I can certainly think of scenario's where 1 application wide check
> > > is
> > > > > not what you want.
> > > > > I know you can always make if statements in the
> > > > IAuthorizationStrategy,
> > > > > like
> > > > > If(component.class==Link.class )
> > > > >         \\use model for security check
> > > > > Else
> > > > >         \\use component self for security check
> > > > > But it doesn't feel as clean (especially for very big if-else
> > > > > statements)
> > > > > By setting the strategy at the component we could even remove the
> > > > > component parameters from the interface
> > > > > ________________________________
> > > > >
> > > > > Maurice Marrink
> > > > > www.topicus.nl
> > > > >
> > > > >
> > > > >
> > > > >
> -------------------------------------------------------
> > > > > This SF.Net email is sponsored by the JBoss Inc.
> > > > > Get Certified Today * Register for a JBoss Training Course
> > > > > Free Certification Exam for All Training Attendees Through End of
> > > 2005
> > > > > Visit http://www.jboss.com/services/certification
> for more
> > > information
> > > > > _______________________________________________
> > > > > Wicket-develop mailing list
> > > > > [email protected]
> > > > >
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
> > > > >
> > > >
> > > >
> > > >
> -------------------------------------------------------
> > > > This SF.Net email is sponsored by the JBoss Inc.
> > > > Get Certified Today * Register for a JBoss Training Course
> > > > Free Certification Exam for All Training Attendees Through End of 2005
> > > > Visit http://www.jboss.com/services/certification for
> more information
> > > > _______________________________________________
> > > > Wicket-develop mailing list
> > > > [email protected]
> > > >
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
> > > >
> > > >
> > > >
> > > >
> -------------------------------------------------------
> > > > This SF.Net email is sponsored by the JBoss Inc.
> > > > Get Certified Today * Register for a JBoss Training Course
> > > > Free Certification Exam for All Training Attendees Through End of 2005
> > > > Visit http://www.jboss.com/services/certification for
> more information
> > > > _______________________________________________
> > > > Wicket-develop mailing list
> > > > [email protected]
> > > >
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
> > > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.Net email is sponsored by the JBoss Inc.
> > > Get Certified Today * Register for a JBoss Training Course
> > > Free Certification Exam for All Training Attendees Through End of 2005
> > > Visit http://www.jboss.com/services/certification for
> more information
> > > _______________________________________________
> > > Wicket-develop mailing list
> > > [email protected]
> > >
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.Net email is sponsored by the JBoss Inc.
> > > Get Certified Today * Register for a JBoss Training Course
> > > Free Certification Exam for All Training Attendees Through End of 2005
> > > Visit http://www.jboss.com/services/certification for
> more information
> > > _______________________________________________
> > > Wicket-develop mailing list
> > > [email protected]
> > >
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
> > >
> >
> >
> > -------------------------------------------------------
> > SF.Net email is sponsored by:
> > Tame your development challenges with Apache's Geronimo App Server.
> Download
> > it for free - -and be entered to win a 42" plasma tv or your very own
> > Sony(tm)PSP.  Click here to play:
> http://sourceforge.net/geronimo.php
> > _______________________________________________
> > Wicket-develop mailing list
> > [email protected]
> >
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >
>
>


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to