Commit 8fcfe4c0 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

getAll removed from RestImpl

parent 49e87a6e
......@@ -69,7 +69,7 @@ public class ConfigurationController extends BaseController {
public List<ConfigurationOption> getOptions(Authentication authentication) {
boolean isAdmin = authentication.getAuthorities()
.contains(new SimpleGrantedAuthority(PrivilegeType.IS_ADMIN.toString()));
return configurationRestImpl.getAllValues().stream()
return configurationService.getAllValues().stream()
.filter(option -> !option.getType().isServerSide() || isAdmin)
.collect(Collectors.toList());
}
......
......@@ -61,10 +61,6 @@ public class ConfigurationRestImpl extends BaseRestImpl {
this.dapiConnector = dapiConnector;
}
public List<ConfigurationOption> getAllValues() {
return configurationService.getAllValues();
}
/**
* @return the configurationService
* @see #configurationService
......
......@@ -37,12 +37,6 @@ public class ConfigurationRestImplTest extends RestTestFunctions {
public void tearDown() throws Exception {
}
@Test
public void testGetAllParams() throws Exception {
List<ConfigurationOption> list = configurationRestImpl.getAllValues();
assertTrue(list.size() > 0);
}
@Test(expected = QueryException.class)
public void testSetSmtpPortToInvalid() throws Exception {
Map<String, Object> data = new HashMap<>();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment