Merge "Revert "GetCapabilities#CheckOne: Return json content type"" into stable-2.15
This commit is contained in:
commit
d360c38803
@ -1092,10 +1092,7 @@ If the user has the global capability the string `ok` is returned.
|
||||
.Response
|
||||
----
|
||||
HTTP/1.1 200 OK
|
||||
Content-Disposition: attachment
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
|
||||
)]}'
|
||||
ok
|
||||
----
|
||||
|
||||
|
@ -24,7 +24,7 @@ import com.google.gerrit.extensions.api.access.PluginPermission;
|
||||
import com.google.gerrit.extensions.config.CapabilityDefinition;
|
||||
import com.google.gerrit.extensions.registration.DynamicMap;
|
||||
import com.google.gerrit.extensions.restapi.AuthException;
|
||||
import com.google.gerrit.extensions.restapi.Response;
|
||||
import com.google.gerrit.extensions.restapi.BinaryResult;
|
||||
import com.google.gerrit.extensions.restapi.RestReadView;
|
||||
import com.google.gerrit.server.CurrentUser;
|
||||
import com.google.gerrit.server.OptionUtil;
|
||||
@ -157,8 +157,8 @@ class GetCapabilities implements RestReadView<AccountResource> {
|
||||
@Singleton
|
||||
static class CheckOne implements RestReadView<AccountResource.Capability> {
|
||||
@Override
|
||||
public Response<String> apply(Capability resource) {
|
||||
return Response.ok("ok");
|
||||
public BinaryResult apply(Capability resource) {
|
||||
return BinaryResult.create("ok\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user