Git Plugin Config: Create fine-grained configuration permissions.

No more hard-coded isAdmin() checks.
Also adds more tests.
This commit is contained in:
Johannes Schnatterer
2018-08-01 16:21:05 +02:00
parent 86af96bd83
commit aed70d3544
10 changed files with 114 additions and 56 deletions

View File

@@ -96,8 +96,7 @@ public class ConfigResourceTest {
request = MockHttpRequest.get("/" + ConfigResource.CONFIG_PATH_V2);
response = new MockHttpResponse();
dispatcher.invoke(request, response);
assertEquals(HttpServletResponse.SC_OK, response.getStatus());
dispatcher.invoke(request, response); assertEquals(HttpServletResponse.SC_OK, response.getStatus());
assertTrue(response.getContentAsString().contains("\"proxyPassword\":\"newPassword\""));
assertTrue(response.getContentAsString().contains("\"self\":{\"href\":\"/v2/config"));
assertTrue("link not found", response.getContentAsString().contains("\"update\":{\"href\":\"/v2/config"));