You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Meier (JIRA)" <ji...@apache.org> on 2019/08/05 21:40:00 UTC

[jira] [Commented] (WICKET-6691) Support Meta annotations (e.g. for @AuthorizeInstantiation)

    [ https://issues.apache.org/jira/browse/WICKET-6691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16900427#comment-16900427 ] 

Sven Meier commented on WICKET-6691:
------------------------------------

You're the first to ask for this feature, so we don't know yet how useful this is for the community.

You can always utilize your own strategy in your project for now.

> Support Meta annotations (e.g. for @AuthorizeInstantiation)
> -----------------------------------------------------------
>
>                 Key: WICKET-6691
>                 URL: https://issues.apache.org/jira/browse/WICKET-6691
>             Project: Wicket
>          Issue Type: Improvement
>            Reporter: Kees van Dieren
>            Priority: Minor
>
> Would be nice to have Meta annotation support for certain Wicket annotations.
> For ex, we have some group of roles that are re-used accross several pages, like so:
> {code:java}
> @AuthorizeInstantiation({"roleA", "roleB", "roleC"})
>  {code}
> Now we copy-paste this code across the pages that need them.
> Would be nice to be able to define an annotation for that, like so:
> {code:java}
> @Target(ElementType.TYPE)
> @Retention(RetentionPolicy.RUNTIME)
> @AuthorizeInstantiation({"roleA", "roleB", "roleC"})
> @Documented
> @Inherited
> public @interface SomeFeatureAuthorization {}
> {code}
> Then, on pages and components requiring authorization checks, just the annotation @SomeFeatureAuthorization has to be added, no longer repeating all the role names.
> Is such a thing already considered? It requires some changes in org.apache.wicket.authroles.authorization.strategies.role.annotations.AnnotationsRoleAuthorizationStrategy probably?
> We have other annotations as well in wicket, which also need to be considered if this is seen by community as useful addition.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)