@Override
    public boolean canReadView(ViewLike view) {
        final String viewId = view.id();

        // If a resolved view id is provided, delegate the permissions check to the resolver.
        final ViewResolverDecoder decoder = new ViewResolverDecoder(viewId);
        if (decoder.isResolverViewId()) {
            final ViewResolver viewResolver = viewResolvers.get(decoder.getResolverName());
            if (viewResolver != null) {
                return viewResolver.canReadView(viewId, isPermitted, isPermittedEntity);
            } else {
                // Resolved view could not be found, so permissions cannot be checked.
                LOG.error("View resolver [{}] could not be found.", decoder.getResolverName());
                return false;
            }
        }

        // Proceed to standard views permission check.
        return isPermitted(ViewsRestPermissions.VIEW_READ, viewId)
                || (view.type().equals(ViewDTO.Type.DASHBOARD) && isPermitted(RestPermissions.DASHBOARDS_READ, viewId));
    }
@Test
    void testResolvedViewReadAccess() {
        // Test that the resolver permission check allows and disallows appropriately.
        assertThat(searchUserResolvedRequiringPermission("missing-permission")
                .canReadView(new TestView("resolver" + ViewResolverDecoder.SEPARATOR + "resolved-id"))).isFalse();
        assertThat(searchUserResolvedRequiringPermission("allowed-permission")
                .canReadView(new TestView("resolver" + ViewResolverDecoder.SEPARATOR + "resolved-id"))).isTrue();

        // Test that the resolver permission and entity id check allows and disallows appropriately.
        assertThat(searchUserResolvedRequiringPermissionEntity("bad-permission", "resolved-id")
                .canReadView(new TestView("resolver" + ViewResolverDecoder.SEPARATOR + "resolved-id"))).isFalse();
        assertThat(searchUserResolvedRequiringPermissionEntity("allowed-permission", "bad-id")
                .canReadView(new TestView("resolver" + ViewResolverDecoder.SEPARATOR + "resolved-id"))).isFalse();
        assertThat(searchUserResolvedRequiringPermissionEntity("missing-permission", "bad-id")
                .canReadView(new TestView("resolver" + ViewResolverDecoder.SEPARATOR + "resolved-id"))).isFalse();
        assertThat(searchUserResolvedRequiringPermissionEntity("allowed-permission", "resolved-id")
                .canReadView(new TestView("resolver" + ViewResolverDecoder.SEPARATOR + "resolved-id"))).isTrue();
    }