Skip to content

Commit cf1e4aa

Browse files
authored
💡 Disabled v0.1 Public API by default (#10372)
refs #10364
1 parent 95b5fb1 commit cf1e4aa

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

core/server/data/schema/default-settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"defaultValue" : "tryghost"
8484
},
8585
"labs": {
86-
"defaultValue": "{\"publicAPI\": true}"
86+
"defaultValue": "{}"
8787
},
8888
"navigation": {
8989
"defaultValue": "[{\"label\":\"Home\", \"url\":\"/\"},{\"label\":\"Tag\", \"url\":\"/tag/getting-started/\"}, {\"label\":\"Author\", \"url\":\"/author/ghost/\"},{\"label\":\"Help\", \"url\":\"https://help.ghost.org\"}]"

core/test/functional/api/v0.1/configuration_spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ describe('Configuration API', function () {
4242
props.blogUrl.should.eql('http://127.0.0.1:2369/');
4343

4444
props.useGravatar.should.eql(false);
45-
props.publicAPI.should.eql(true);
4645
props.clientId.should.eql('ghost-admin');
4746
props.clientSecret.should.eql('not_available');
4847

core/test/functional/api/v0.1/public_api_spec.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,21 @@ describe('Public API', function () {
2323
})
2424
.then(function () {
2525
return localUtils.doAuth(request, 'users:no-owner', 'user:inactive', 'posts', 'tags:extra', 'client:trusted-domain');
26-
});
26+
})
27+
.then(function (token) {
28+
return request.put(localUtils.API.getApiQuery('settings/'))
29+
.set('Authorization', 'Bearer ' + token)
30+
.send({
31+
settings: [{
32+
key: 'labs',
33+
value: {publicAPI: true}
34+
}]
35+
})
36+
.expect('Content-Type', /json/)
37+
.expect('Cache-Control', testUtils.cacheRules.private)
38+
.expect(200)
39+
.then(() => {});
40+
});
2741
});
2842

2943
afterEach(function () {

core/test/functional/api/v2/admin/configuration_spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ describe('Configuration API', function () {
3737
props.blogUrl.should.eql('http://127.0.0.1:2369/');
3838

3939
props.useGravatar.should.eql(false);
40-
props.publicAPI.should.eql(true);
4140
props.clientId.should.eql('ghost-admin');
4241
props.clientSecret.should.eql('not_available');
4342

0 commit comments

Comments
 (0)