Github user martin-g commented on a diff in the pull request: https://github.com/apache/wicket/pull/99#discussion_r25233330 --- 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( + resource.getClass().getPackage().getAnnotation(AuthorizeResource.class)); + } + + private boolean checkResource(AuthorizeResource annotation) + { + if (annotation != null) + { + return hasAny(new Roles(annotation.value())); + } else --- End diff -- `else` on new line
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---