You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2014/01/15 13:45:20 UTC

[jira] [Resolved] (WICKET-5454) IAuthorizationStrategy#isInstantiationAuthorized(Class componentClass) should be passed the instance, not only it's class

     [ https://issues.apache.org/jira/browse/WICKET-5454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-5454.
-------------------------------------

    Resolution: Won't Fix

As discussed on the dev@ mailing list this change won't be made.

> IAuthorizationStrategy#isInstantiationAuthorized(Class<T> componentClass) should be passed the instance, not only it's class
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-5454
>                 URL: https://issues.apache.org/jira/browse/WICKET-5454
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 6.12.0
>            Reporter: Tom Götz
>            Priority: Minor
>
> It would be easier to decide if instantiation is authorized if one could access some properties of the component being constructed. Usecase: we restrict access to certain pages with an own IAuthorizationStrategy implementation, but we'd like error pages to be instantiated. Now, this is not easy to decide if you are only passed the page's class. A call to isErrorPage() would be more elegant in that situation.
> Is there a reason why the class, but not the instance is passed to IAuthorizationStrategy#isInstantiationAuthorized (see constructor of Application: https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/Application.java#L261)?



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)