public boolean canUserViewTemplates(CaseInsensitiveString username, List<Role> roles, boolean isGroupAdministrator) {
        for (PipelineTemplateConfig templateConfig : this) {
            if (hasViewAccessToTemplate(templateConfig, username, roles, isGroupAdministrator)) {
                return true;
            }
        }
        return false;
    }
@Test
    public void shouldReturnFalseIfUserCannotViewAtLeastOneTemplate() {
        CaseInsensitiveString templateViewUser = new CaseInsensitiveString("template-view");
        TemplatesConfig templates = configForUserWhoCanViewATemplate();

        assertThat(templates.canUserViewTemplates(templateViewUser, null, false), is(false));
    }