0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

💡 Disabled v0.1 Public API by default (#10372)

refs #10364
This commit is contained in:
Fabien O'Carroll 2019-01-15 11:09:34 +01:00 committed by GitHub
parent 95b5fb1c81
commit cf1e4aa593
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 4 deletions

View file

@ -83,7 +83,7 @@
"defaultValue" : "tryghost"
},
"labs": {
"defaultValue": "{\"publicAPI\": true}"
"defaultValue": "{}"
},
"navigation": {
"defaultValue": "[{\"label\":\"Home\", \"url\":\"/\"},{\"label\":\"Tag\", \"url\":\"/tag/getting-started/\"}, {\"label\":\"Author\", \"url\":\"/author/ghost/\"},{\"label\":\"Help\", \"url\":\"https://help.ghost.org\"}]"

View file

@ -42,7 +42,6 @@ describe('Configuration API', function () {
props.blogUrl.should.eql('http://127.0.0.1:2369/');
props.useGravatar.should.eql(false);
props.publicAPI.should.eql(true);
props.clientId.should.eql('ghost-admin');
props.clientSecret.should.eql('not_available');

View file

@ -23,7 +23,21 @@ describe('Public API', function () {
})
.then(function () {
return localUtils.doAuth(request, 'users:no-owner', 'user:inactive', 'posts', 'tags:extra', 'client:trusted-domain');
});
})
.then(function (token) {
return request.put(localUtils.API.getApiQuery('settings/'))
.set('Authorization', 'Bearer ' + token)
.send({
settings: [{
key: 'labs',
value: {publicAPI: true}
}]
})
.expect('Content-Type', /json/)
.expect('Cache-Control', testUtils.cacheRules.private)
.expect(200)
.then(() => {});
});
});
afterEach(function () {

View file

@ -37,7 +37,6 @@ describe('Configuration API', function () {
props.blogUrl.should.eql('http://127.0.0.1:2369/');
props.useGravatar.should.eql(false);
props.publicAPI.should.eql(true);
props.clientId.should.eql('ghost-admin');
props.clientSecret.should.eql('not_available');