I vote for 1 entry point. And I see nothing wrong with that being an attributemodifier. Any isEnabled check should be asked at the securitystrategy.
________________________________________ Maurice Marrink ________________________________________ From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: dinsdag 1 november 2005 2:26 To: [email protected] Subject: Re: [Wicket-develop] iauthorizationpolicy.allowenabled() and component.isenabled() I agree, we need a hook, but i dont think isEnabled is that hook. Consider this: if (component.isEnabled()) { component.setModelObject("blah"); } this will throw a security exception if the component is enabled, but auth policy overrides it. Auth policy disables a component before rendering. Ie invocation handlers will not be allowed on a disabled object, etc. This isnt implemented yet but will be in the future. -Igor On 10/31/05, Arto Arffman <[EMAIL PROTECTED]> wrote: -1 if so, what's the hook for disabling things. wicket.markup.html.link.Link is now bugged (cvs head) because it uses setEnabled in onComponentTag(). Disabling should be done before rendering and that is not allways possible. 2005/11/1, Eelco Hillenius <[EMAIL PROTECTED]>: Yeah, I tried to avoid breaking clients. Not the best idea however, so I am +1 for folding it into a final isEnabled method. Eelco On 10/31/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > Currently there is a slight disconnect between the way Component.isEnabled() > and the authorization policy work. The idea is to allow the policy to > override the enabled state of component by returning false in > allowEnabled(Component c) call, but in Component.isEnabled () we do not check > for this. > > This causes a problem because a call to Component.isEnabled() can return > true, while allowEnabled() for the same component will return false. Imagine > a situation where a component is a markupcontainer that has a few children. > These children want to set their visibility based on enabled/disabled state > of their parent. Currently the children would have to check both the > component.isEnabled() and allowEnabled() of the policy - which is > cumbersome. > > I propose adding the allowEnabled() check into the Component.isEnabled() > call and making it final to insure integrity. It would look like this: > > final boolean Component.isEnabled () { return > getFlag(ENABLED)&&getApplication().getPolicy().allowEnabled(this); > } > > This change will however break some clients. isEnabled() is a pretty common > thing to put into your component and our Link component had it introducded > in 1.1. > > What are your thoughts/votes? > > -Igor > ------------------------------------------------------- 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
