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 shouldReturnTrueIfUserCanViewAtLeastOneTemplate() {
        CaseInsensitiveString templateViewUser = new CaseInsensitiveString("template-view");
        TemplatesConfig templates = configForUserWhoCanViewATemplate();
        templates.add(PipelineTemplateConfigMother.createTemplate("template200", new Authorization(new ViewConfig(new AdminUser(templateViewUser))), StageConfigMother.manualStage("stage-name")));

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