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


---
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.
---

Reply via email to