mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 22:45:45 +01:00
plugin translation servlet
This commit is contained in:
@@ -52,7 +52,12 @@ public class ScmRequests {
|
||||
setUsername(username);
|
||||
setPassword(password);
|
||||
return new ChangePasswordResponse<>(applyPUTRequest(RestUtil.REST_BASE_URL.resolve("users/"+userPathParam+"/password").toString(), VndMediaType.PASSWORD_OVERWRITE, TestData.createPasswordChangeJson(password,newPassword)), null);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public ModelResponse requestPluginTranslations(String language) {
|
||||
Response response = applyGETRequest(RestUtil.BASE_URL.resolve("locales/" + language + "/plugins.json").toString());
|
||||
return new ModelResponse(response, null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -90,6 +95,11 @@ public class ScmRequests {
|
||||
*/
|
||||
private Response applyGETRequestWithQueryParams(String url, String params) {
|
||||
LOG.info("GET {}", url);
|
||||
if (username == null || password == null){
|
||||
return RestAssured.given()
|
||||
.when()
|
||||
.get(url + params);
|
||||
}
|
||||
return RestAssured.given()
|
||||
.auth().preemptive().basic(username, password)
|
||||
.when()
|
||||
|
||||
Reference in New Issue
Block a user