[ https://issues.apache.org/jira/browse/WICKET-5749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14334545#comment-14334545 ]
ASF GitHub Bot commented on WICKET-5749: ---------------------------------------- Github user martin-g commented on a diff in the pull request: https://github.com/apache/wicket/pull/99#discussion_r25233416 --- Diff: wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java --- @@ -140,4 +142,22 @@ private boolean check(final Action action, final AuthorizeAction authorizeAction } return true; } + + @Override + public boolean isResourceAuthorized(IResource resource, PageParameters pageParameters) + { + return checkResource(resource.getClass().getAnnotation(AuthorizeResource.class)) || checkResource( --- End diff -- to simplify it a bit you can extract `resource.getClass()` as a local variable > Wicket-auth-roles should deal with resource authorization > --------------------------------------------------------- > > Key: WICKET-5749 > URL: https://issues.apache.org/jira/browse/WICKET-5749 > Project: Wicket > Issue Type: Improvement > Components: wicket-auth-roles > Affects Versions: 7.0.0-M3 > Reporter: Carl-Eric Menzel > Assignee: Carl-Eric Menzel > Priority: Minor > > We now have IAuthorizationStrategy.isResourceAuthorized, which is awesome. So > far, wicket-auth-roles's implementation allows all resources to go through > without any possibility of configuring that. > I think the default auth strategy shipped with Wicket should support this :-) > Perhaps an additional annotation like "@AuthorizeResource"? -- This message was sent by Atlassian JIRA (v6.3.4#6332)