    public int vote(Authentication authentication,
                    Object object,
                    ConfigAttributeDefinition config) {
        if (! (authentication instanceof UsernamePasswordAuthenticationToken)) {
            return ACCESS_ABSTAIN;
        }
        CosmoUserDetails details =
            (CosmoUserDetails) authentication.getPrincipal();
        String username = details.getUser().getUsername();
        FilterInvocation fi = (FilterInvocation) object;
        String path = findResourcePath(fi);
        return path.startsWith(username) ? ACCESS_GRANTED : ACCESS_DENIED;
    }

    public int vote(Authentication authentication,
                    Object object,
                    ConfigAttributeDefinition config) {
        if (! (authentication instanceof UsernamePasswordAuthenticationToken)) {
            return ACCESS_ABSTAIN;
        }
        CosmoUserDetails details =
            (CosmoUserDetails) authentication.getPrincipal();
        String username = details.getUser().getUsername();
        FilterInvocation fi = (FilterInvocation) object;
        String path = findResourcePath(fi);
        if (path == null) {
            return ACCESS_DENIED;
        }
        return path.startsWith(username) ? ACCESS_GRANTED : ACCESS_DENIED;
    }
