diff --git a/core/server/data/importer/importers/data/base.js b/core/server/data/importer/importers/data/base.js index 67bce596aa..9a62fe6756 100644 --- a/core/server/data/importer/importers/data/base.js +++ b/core/server/data/importer/importers/data/base.js @@ -16,7 +16,15 @@ class Base { this.errorConfig = { allowDuplicates: true, - returnDuplicates: true + returnDuplicates: true, + showNotFoundWarning: true + }; + + this.legacyKeys = {}; + this.legacyMapper = function legacyMapper(item) { + return _.mapKeys(item, function matchLegacyKey(value, key) { + return self.legacyKeys[key] || key; + }); }; this.dataKeyToImport = options.dataKeyToImport; @@ -79,12 +87,14 @@ class Base { })); } } else if (err instanceof errors.NotFoundError) { - problems.push({ - message: 'Entry was not imported and ignored. Could not find entry.', - help: self.modelName, - context: JSON.stringify(obj), - err: err - }); + if (self.showNotFoundWarning) { + problems.push({ + message: 'Entry was not imported and ignored. Could not find entry.', + help: self.modelName, + context: JSON.stringify(obj), + err: err + }); + } } else { if (!errors.utils.isIgnitionError(err)) { err = new errors.DataImportError({ diff --git a/core/server/data/importer/importers/data/posts.js b/core/server/data/importer/importers/data/posts.js index 3853a3b485..061597c8d1 100644 --- a/core/server/data/importer/importers/data/posts.js +++ b/core/server/data/importer/importers/data/posts.js @@ -13,6 +13,10 @@ class PostsImporter extends BaseImporter { dataKeyToImport: 'posts', requiredData: ['tags', 'posts_tags'] })); + + this.legacyKeys = { + image: 'feature_image' + }; } sanitizeAttributes() { @@ -99,10 +103,42 @@ class PostsImporter extends BaseImporter { beforeImport() { debug('beforeImport'); + let mobileDocContent, self = this; this.sanitizeAttributes(); this.addTagsToPosts(); + // Remove legacy field language + this.dataToImport = _.filter(this.dataToImport, function (data) { + return _.omit(data, 'language'); + }); + + this.dataToImport = this.dataToImport.map(self.legacyMapper); + + // For legacy imports/custom imports with only html we can parse the markdown or html into a mobile doc card + // For now we can hardcode the version + _.each(this.dataToImport, function (model) { + if (!model.mobiledoc) { + if (model.markdown && model.markdown.length > 0) { + mobileDocContent = model.markdown; + } else if (model.html && model.html.length > 0) { + mobileDocContent = model.html; + } else { + // Set mobileDocContent to null else it will affect empty posts + mobileDocContent = null; + } + if (mobileDocContent) { + model.mobiledoc = JSON.stringify({ + version: '0.3.1', + markups: [], + atoms: [], + cards: [['card-markdown',{cardName: 'card-markdown',markdown: mobileDocContent}]], + sections:[[10,0]] + }); + } + } + }); + // NOTE: do after, because model properties are deleted e.g. post.id return super.beforeImport(); } diff --git a/core/server/data/importer/importers/data/settings.js b/core/server/data/importer/importers/data/settings.js index 947fc58bee..64a88e54ab 100644 --- a/core/server/data/importer/importers/data/settings.js +++ b/core/server/data/importer/importers/data/settings.js @@ -14,9 +14,17 @@ class SettingsImporter extends BaseImporter { requiredData: [] })); - this.legacyKeys = { - activePlugins: 'active_apps', - installedPlugins: 'installed_apps' + this.errorConfig = { + allowDuplicates: true, + returnDuplicates: true, + showNotFoundWarning: false + }; + + // Map legacy keys + this.legacySettingsKeyValues = { + isPrivate: 'is_private', + activeTimezone: 'active_timezone', + cover: 'cover_image' }; } @@ -27,14 +35,25 @@ class SettingsImporter extends BaseImporter { beforeImport() { debug('beforeImport'); - let self = this; + let self = this, + ltsActiveTheme = _.find(this.dataToImport, {key: 'activeTheme'}); + // If there is an lts we want to warn user that theme is not imported + if (ltsActiveTheme) { + self.problems.push({ + message: 'Theme not imported, please upload in Settings - Design', + help: self.modelName, + context: JSON.stringify(ltsActiveTheme) + }); + } + + // Remove core and theme data types this.dataToImport = _.filter(this.dataToImport, function (data) { return ['core', 'theme'].indexOf(data.type) === -1; }); _.each(this.dataToImport, function (obj) { - obj.key = self.legacyKeys[obj.key] || obj.key; + obj.key = self.legacySettingsKeyValues[obj.key] || obj.key; }); return super.beforeImport(); diff --git a/core/server/data/importer/importers/data/tags.js b/core/server/data/importer/importers/data/tags.js index efeb70cd09..632b13efee 100644 --- a/core/server/data/importer/importers/data/tags.js +++ b/core/server/data/importer/importers/data/tags.js @@ -13,6 +13,11 @@ class TagsImporter extends BaseImporter { dataKeyToImport: 'tags', requiredData: [] })); + + // Map legacy keys + this.legacyKeys = { + image: 'feature_image' + }; } beforeImport() { @@ -32,6 +37,8 @@ class TagsImporter extends BaseImporter { let self = this, ops = []; + this.dataToImport = this.dataToImport.map(self.legacyMapper); + _.each(this.dataToImport, function (obj) { ops.push(models[self.modelName].findOne({name: obj.name}, options).then(function (tag) { if (tag) { diff --git a/core/server/data/importer/importers/data/users.js b/core/server/data/importer/importers/data/users.js index 9a8ec6cb27..3f55f29921 100644 --- a/core/server/data/importer/importers/data/users.js +++ b/core/server/data/importer/importers/data/users.js @@ -12,6 +12,13 @@ class UsersImporter extends BaseImporter { dataKeyToImport: 'users', requiredData: ['roles', 'roles_users'] })); + + // Map legacy keys + this.legacyKeys = { + image: 'profile_image', + cover: 'cover_image', + last_login: 'last_seen' + }; } /** @@ -25,6 +32,13 @@ class UsersImporter extends BaseImporter { let self = this, role; + // Remove legacy field language + this.dataToImport = _.filter(this.dataToImport, function (data) { + return _.omit(data, 'language'); + }); + + this.dataToImport = this.dataToImport.map(self.legacyMapper); + _.each(this.dataToImport, function (model) { model.password = globalUtils.uid(50); model.status = 'locked'; diff --git a/core/test/integration/data/importer/importers/data_spec.js b/core/test/integration/data/importer/importers/data_spec.js index dc55c78121..e9e5c832aa 100644 --- a/core/test/integration/data/importer/importers/data_spec.js +++ b/core/test/integration/data/importer/importers/data_spec.js @@ -39,7 +39,7 @@ describe('Import', function () { it('import results have data and problems', function (done) { var exportData; - testUtils.fixtures.loadExportFixture('export-003').then(function (exported) { + testUtils.fixtures.loadExportFixture('export-003', {lts:true}).then(function (exported) { exportData = exported; return dataImporter.doImport(exportData); }).then(function (importResult) { @@ -54,14 +54,13 @@ describe('Import', function () { it('removes duplicate posts', function (done) { var exportData; - testUtils.fixtures.loadExportFixture('export-003').then(function (exported) { + testUtils.fixtures.loadExportFixture('export-003',{lts:true}).then(function (exported) { exportData = exported; return dataImporter.doImport(exportData); }).then(function (importResult) { should.exist(importResult.data.posts); - importResult.data.posts.length.should.equal(1); - importResult.problems.length.should.eql(8); + importResult.problems.length.should.eql(2); done(); }).catch(done); @@ -70,7 +69,7 @@ describe('Import', function () { it('removes duplicate tags and updates associations', function (done) { var exportData; - testUtils.fixtures.loadExportFixture('export-003-duplicate-tags').then(function (exported) { + testUtils.fixtures.loadExportFixture('export-003-duplicate-tags', {lts:true}).then(function (exported) { exportData = exported; return dataImporter.doImport(exportData); }).then(function (importResult) { @@ -87,7 +86,9 @@ describe('Import', function () { return postTag.tag_id !== 2; }); - importResult.problems.length.should.equal(9); + importResult.problems.length.should.equal(3); + + importResult.problems[2].message.should.equal('Theme not imported, please upload in Settings - Design'); done(); }).catch(done); @@ -100,7 +101,7 @@ describe('Import', function () { it('imports data from 000', function (done) { var exportData; - testUtils.fixtures.loadExportFixture('export-000').then(function (exported) { + testUtils.fixtures.loadExportFixture('export-000', {lts:true}).then(function (exported) { exportData = exported; return dataImporter.doImport(exportData); }).then(function () { @@ -146,7 +147,7 @@ describe('Import', function () { it('safely imports data, from 001', function (done) { var exportData; - testUtils.fixtures.loadExportFixture('export-001').then(function (exported) { + testUtils.fixtures.loadExportFixture('export-001', {lts:true}).then(function (exported) { exportData = exported; return dataImporter.doImport(exportData); }).then(function () { @@ -203,7 +204,7 @@ describe('Import', function () { it('doesn\'t import invalid settings data from 001', function (done) { var exportData; - testUtils.fixtures.loadExportFixture('export-001-invalid-setting').then(function (exported) { + testUtils.fixtures.loadExportFixture('export-001-invalid-setting', {lts:true}).then(function (exported) { exportData = exported; return dataImporter.doImport(exportData); }).then(function () { @@ -244,7 +245,7 @@ describe('Import', function () { it('safely imports data from 002', function (done) { var exportData; - testUtils.fixtures.loadExportFixture('export-002').then(function (exported) { + testUtils.fixtures.loadExportFixture('export-002', {lts:true}).then(function (exported) { exportData = exported; return dataImporter.doImport(exportData); }).then(function () { @@ -305,7 +306,7 @@ describe('Import', function () { it('safely imports data from 003 (single user)', function (done) { var exportData; - testUtils.fixtures.loadExportFixture('export-003').then(function (exported) { + testUtils.fixtures.loadExportFixture('export-003', {lts:true}).then(function (exported) { exportData = exported; return dataImporter.doImport(exportData); }).then(function () { @@ -344,7 +345,7 @@ describe('Import', function () { it('handles validation errors nicely', function (done) { var exportData; - testUtils.fixtures.loadExportFixture('export-003-badValidation').then(function (exported) { + testUtils.fixtures.loadExportFixture('export-003-badValidation', {lts:true}).then(function (exported) { exportData = exported; return dataImporter.doImport(exportData); }).then(function () { @@ -368,7 +369,7 @@ describe('Import', function () { it('handles database errors nicely: duplicated tag slugs', function (done) { var exportData; - testUtils.fixtures.loadExportFixture('export-003-dbErrors').then(function (exported) { + testUtils.fixtures.loadExportFixture('export-003-dbErrors', {lts:true}).then(function (exported) { exportData = exported; return dataImporter.doImport(exportData); }).then(function (importedData) { @@ -386,7 +387,7 @@ describe('Import', function () { it('does import posts with an invalid author', function (done) { var exportData; - testUtils.fixtures.loadExportFixture('export-003-mu-unknownAuthor').then(function (exported) { + testUtils.fixtures.loadExportFixture('export-003-mu-unknownAuthor', {lts:true}).then(function (exported) { exportData = exported; return dataImporter.doImport(exportData); }).then(function (importedData) { @@ -436,7 +437,7 @@ describe('Import', function () { it('doesn\'t import invalid tags data from 003', function (done) { var exportData; - testUtils.fixtures.loadExportFixture('export-003-nullTags').then(function (exported) { + testUtils.fixtures.loadExportFixture('export-003-nullTags', {lts:true}).then(function (exported) { exportData = exported; return dataImporter.doImport(exportData); }).then(function () { @@ -454,7 +455,7 @@ describe('Import', function () { it('doesn\'t import invalid posts data from 003', function (done) { var exportData; - testUtils.fixtures.loadExportFixture('export-003-nullPosts').then(function (exported) { + testUtils.fixtures.loadExportFixture('export-003-nullPosts', {lts:true}).then(function (exported) { exportData = exported; return dataImporter.doImport(exportData); }).then(function () { @@ -475,7 +476,7 @@ describe('Import', function () { it('correctly sanitizes incorrect UUIDs', function (done) { var exportData; - testUtils.fixtures.loadExportFixture('export-003-wrongUUID').then(function (exported) { + testUtils.fixtures.loadExportFixture('export-003-wrongUUID', {lts:true}).then(function (exported) { exportData = exported; return dataImporter.doImport(exportData); }).then(function () { @@ -499,7 +500,7 @@ describe('Import', function () { it('ensure post tag order is correct', function (done) { var exportData; - testUtils.fixtures.loadExportFixture('export-004').then(function (exported) { + testUtils.fixtures.loadExportFixture('export-004', {lts:true}).then(function (exported) { exportData = exported; return dataImporter.doImport(exportData); }).then(function () { @@ -547,7 +548,7 @@ describe('Import', function () { it('doesn\'t import a title which is too long', function (done) { var exportData; - testUtils.fixtures.loadExportFixture('export-001').then(function (exported) { + testUtils.fixtures.loadExportFixture('export-001', {lts:true}).then(function (exported) { exportData = exported; // change title to 1001 characters @@ -596,7 +597,7 @@ describe('Import (new test structure)', function () { before(function doImport(done) { testUtils.initFixtures('roles', 'owner', 'settings').then(function () { - return testUtils.fixtures.loadExportFixture('export-003-mu'); + return testUtils.fixtures.loadExportFixture('export-003-mu', {lts:true}); }).then(function (exported) { exportData = exported; return dataImporter.doImport(exportData); @@ -818,7 +819,7 @@ describe('Import (new test structure)', function () { before(function doImport(done) { testUtils.initFixtures('roles', 'owner', 'settings').then(function () { - return testUtils.fixtures.loadExportFixture('export-003-mu-noOwner'); + return testUtils.fixtures.loadExportFixture('export-003-mu-noOwner', {lts:true}); }).then(function (exported) { exportData = exported; return dataImporter.doImport(exportData); @@ -1041,7 +1042,7 @@ describe('Import (new test structure)', function () { before(function doImport(done) { // initialise the blog with some data testUtils.initFixtures('users:roles', 'posts', 'settings').then(function () { - return testUtils.fixtures.loadExportFixture('export-003-mu'); + return testUtils.fixtures.loadExportFixture('export-003-mu', {lts:true}); }).then(function (exported) { exportData = exported; return dataImporter.doImport(exportData); @@ -1270,7 +1271,7 @@ describe('Import (new test structure)', function () { before(function doImport(done) { // initialise the blog with some data testUtils.initFixtures('users:roles', 'posts', 'settings').then(function () { - return testUtils.fixtures.loadExportFixture('export-003-mu-multipleOwner'); + return testUtils.fixtures.loadExportFixture('export-003-mu-multipleOwner', {lts: true}); }).then(function (exported) { exportData = exported; return dataImporter.doImport(exportData); @@ -1334,4 +1335,221 @@ describe('Import (new test structure)', function () { }).catch(done); }); }); + + describe('lts: legacy fields', function () { + var exportData; + + before(function doImport(done) { + // initialise the blog with some data + testUtils.initFixtures('roles', 'owner', 'settings').then(function () { + return testUtils.fixtures.loadExportFixture('export-lts-legacy-fields', {lts: true}); + }).then(function (exported) { + exportData = exported; + return dataImporter.doImport(exportData); + }).then(function () { + done(); + }).catch(done); + }); + + after(testUtils.teardown); + + it('ensure data is still imported and mapped correctly', function (done) { + var fetchImported = Promise.join( + knex('users').select(), + knex('posts').select(), + knex('tags').select(), + knex('settings').select() + ); + + fetchImported + .then(function (importedData) { + should.exist(importedData); + importedData.length.should.equal(4); + + var users = importedData[0], + posts = importedData[1], + tags = importedData[2], + settings = importedData[3], + firstPost = _.find(posts, {slug: exportData.data.posts[0].slug}); + + // Check length of of posts, tags and users + posts.length.should.equal(exportData.data.posts.length); + tags.length.should.equal(exportData.data.tags.length); + // Users include original user + joe bloggs' brother + users.length.should.equal(exportData.data.users.length + 1); + + // Check feature image is correctly mapped for a post + firstPost.feature_image.should.eql('/content/images/2017/05/post-image.jpg'); + // Check logo and cover images are correctly mapped for a user + users[1].cover_image.should.eql(exportData.data.users[0].cover); + users[1].profile_image.should.eql(exportData.data.users[0].image); + // Check feature image is correctly mapped for a tag + tags[0].feature_image.should.eql(exportData.data.tags[0].image); + // Check logo image is correctly mapped for a blog + settings[6].key.should.eql('logo'); + settings[6].value.should.eql('/content/images/2017/05/bloglogo.jpeg'); + // Check cover image is correctly mapped for a blog + settings[7].key.should.eql('cover_image'); + settings[7].value.should.eql('/content/images/2017/05/blogcover.jpeg'); + + // Check default settings locale is not overwritten by defaultLang + settings[9].key.should.eql('default_locale'); + settings[9].value.should.eql('en'); + + // Check post language is null + should(firstPost.locale).equal(null); + // Check user language is null + should(users[1].locale).equal(null); + + // Check mobiledoc is populated from markdown + JSON.parse(firstPost.mobiledoc).cards[0][1].markdown.should.eql(exportData.data.posts[0].markdown); + + done(); + }).catch(done); + }); + }); + + describe('lts: style import with missing markdown or html values', function () { + var exportData; + + before(function doImport(done) { + // initialise the blog with some data + testUtils.initFixtures('roles', 'owner', 'settings').then(function () { + return testUtils.fixtures.loadExportFixture('export-lts-style-bad-markdown-html', + {lts: true} + ); + }).then(function (exported) { + exportData = exported; + return dataImporter.doImport(exportData); + }).then(function () { + done(); + }).catch(done); + }); + + after(testUtils.teardown); + + it('ensure images are mapped correctly and language is null', function (done) { + var fetchImported = Promise.join( + knex('users').select(), + knex('posts').select(), + knex('tags').select(), + knex('settings').select() + ); + + fetchImported.then(function (importedData) { + should.exist(importedData); + importedData.length.should.equal(4); + + var users = importedData[0], + posts = importedData[1], + tags = importedData[2], + settings = importedData[3], + firstPost = _.find(posts, {slug: exportData.data.posts[0].slug}), + secondPost = _.find(posts, {slug: exportData.data.posts[1].slug}), + thirdPost = _.find(posts, {slug: exportData.data.posts[2].slug}), + fourthPost = _.find(posts, {slug: exportData.data.posts[3].slug}); + + // Check length of of posts, tags and users + posts.length.should.equal(exportData.data.posts.length); + tags.length.should.equal(exportData.data.tags.length); + // Users include original user + joe bloggs' brother + users.length.should.equal(exportData.data.users.length + 1); + + // Check feature image is correctly mapped for a post + should(firstPost.feature_image).equal(null); + // Check logo and cover images are correctly mapped for a user + users[1].cover_image.should.eql(exportData.data.users[0].cover); + users[1].profile_image.should.eql(exportData.data.users[0].image); + // Check feature image is correctly mapped for a tag + tags[0].feature_image.should.eql(exportData.data.tags[0].image); + // Check logo image is correctly mapped for a blog + settings[6].key.should.eql('logo'); + settings[6].value.should.eql('/content/images/2017/05/bloglogo.jpeg'); + // Check cover image is correctly mapped for a blog + settings[7].key.should.eql('cover_image'); + settings[7].value.should.eql('/content/images/2017/05/blogcover.jpeg'); + + // Check default settings locale is not overwritten by defaultLang + settings[9].key.should.eql('default_locale'); + settings[9].value.should.eql('en'); + + // Check post language is set to null + should(firstPost.locale).equal(null); + // Check user language is set to null + should(users[1].locale).equal(null); + + // Check last_seen is mapped from last_login for user + assert.equal( + moment(users[1].last_seen).valueOf(), + moment(exportData.data.users[0].last_login).valueOf() + ); + // Check mobiledoc is populated from from html when mobiledoc is null & markdown is empty string + JSON.parse(firstPost.mobiledoc).cards[0][1].markdown.should.eql(exportData.data.posts[0].html); + // Check mobiledoc is populated from from html when mobiledoc is null & markdown is null + JSON.parse(secondPost.mobiledoc).cards[0][1].markdown.should.eql(exportData.data.posts[1].html); + // Check mobiledoc is null when markdown and mobiledoc are null and html is empty string + should(thirdPost.mobiledoc).equal(null); + // Check mobiledoc is null when markdown, mobiledoc are html are null + should(fourthPost.mobiledoc).equal(null); + + done(); + }).catch(done); + }); + + it('ensure post without mobiledoc key uses markdown', function (done) { + var fetchImported = Promise.resolve(knex('posts').select()); + + fetchImported.then(function (importedData) { + should.exist(importedData); + importedData.length.should.equal(5); + + var posts = importedData, + fifthPost = _.find(posts, {slug: exportData.data.posts[4].slug}); + + // Check mobiledoc is populated from from html when mobiledoc is null & markdown is empty string + JSON.parse(fifthPost.mobiledoc).cards[0][1].markdown.should.eql(exportData.data.posts[4].markdown); + + done(); + }).catch(done); + }); + }); + + describe('lts: style import for user with a very long email address', function () { + var exportData; + + before(function doImport(done) { + // initialise the blog with some data + testUtils.initFixtures('roles', 'owner', 'settings').then(function () { + return testUtils.fixtures.loadExportFixture('export-lts-style-user-long-email', + {lts: true} + ); + }).then(function (exported) { + exportData = exported; + done(); + }).catch(done); + }); + + after(testUtils.teardown); + + it('provides error message and does not import where lts email address is longer that 1.0.0 constraint', function (done) { + testUtils.fixtures.loadExportFixture('export-lts-style-user-long-email', {lts:true}).then(function (exported) { + exportData = exported; + return dataImporter.doImport(exportData); + }).then(function () { + (1).should.eql(0, 'Data import should not resolve promise.'); + }).catch(function (error) { + error[0].message.should.eql('Value in [users.email] exceeds maximum length of 191 characters.'); + error[0].errorType.should.eql('ValidationError'); + + Promise.resolve(knex('users').select()).then(function (users) { + should.exist(users); + + users.length.should.equal(1, 'Did not get data successfully'); + users[0].email.should.not.equal(exportData.data.users[0].email); + + done(); + }); + }); + }); + }); }); diff --git a/core/test/unit/data/importer/index_spec.js b/core/test/unit/data/importer/index_spec.js index 00d7646c05..ab38f365a1 100644 --- a/core/test/unit/data/importer/index_spec.js +++ b/core/test/unit/data/importer/index_spec.js @@ -313,7 +313,7 @@ describe('Importer', function () { it('correctly handles a valid db api wrapper', function (done) { var file = [{ - path: testUtils.fixtures.getExportFixturePath('export-003-api-wrapper'), + path: testUtils.fixtures.getExportFixturePath('export-003-api-wrapper', {lts: true}), name: 'export-003-api-wrapper.json' }]; JSONHandler.loadFile(file).then(function (result) { @@ -325,7 +325,7 @@ describe('Importer', function () { it('correctly errors when given a bad db api wrapper', function (done) { var file = [{ - path: testUtils.fixtures.getExportFixturePath('export-003-api-wrapper-bad'), + path: testUtils.fixtures.getExportFixturePath('export-003-api-wrapper-bad', {lts: true}), name: 'export-003-api-wrapper-bad.json' }]; diff --git a/core/test/utils/fixtures/export/export-000.json b/core/test/utils/fixtures/export/lts/export-000.json similarity index 100% rename from core/test/utils/fixtures/export/export-000.json rename to core/test/utils/fixtures/export/lts/export-000.json diff --git a/core/test/utils/fixtures/export/export-001-invalid-setting.json b/core/test/utils/fixtures/export/lts/export-001-invalid-setting.json similarity index 100% rename from core/test/utils/fixtures/export/export-001-invalid-setting.json rename to core/test/utils/fixtures/export/lts/export-001-invalid-setting.json diff --git a/core/test/utils/fixtures/export/export-001.json b/core/test/utils/fixtures/export/lts/export-001.json similarity index 100% rename from core/test/utils/fixtures/export/export-001.json rename to core/test/utils/fixtures/export/lts/export-001.json diff --git a/core/test/utils/fixtures/export/export-002.json b/core/test/utils/fixtures/export/lts/export-002.json similarity index 100% rename from core/test/utils/fixtures/export/export-002.json rename to core/test/utils/fixtures/export/lts/export-002.json diff --git a/core/test/utils/fixtures/export/export-003-api-wrapper-bad.json b/core/test/utils/fixtures/export/lts/export-003-api-wrapper-bad.json similarity index 100% rename from core/test/utils/fixtures/export/export-003-api-wrapper-bad.json rename to core/test/utils/fixtures/export/lts/export-003-api-wrapper-bad.json diff --git a/core/test/utils/fixtures/export/export-003-api-wrapper.json b/core/test/utils/fixtures/export/lts/export-003-api-wrapper.json similarity index 100% rename from core/test/utils/fixtures/export/export-003-api-wrapper.json rename to core/test/utils/fixtures/export/lts/export-003-api-wrapper.json diff --git a/core/test/utils/fixtures/export/export-003-badValidation.json b/core/test/utils/fixtures/export/lts/export-003-badValidation.json similarity index 100% rename from core/test/utils/fixtures/export/export-003-badValidation.json rename to core/test/utils/fixtures/export/lts/export-003-badValidation.json diff --git a/core/test/utils/fixtures/export/export-003-dbErrors.json b/core/test/utils/fixtures/export/lts/export-003-dbErrors.json similarity index 100% rename from core/test/utils/fixtures/export/export-003-dbErrors.json rename to core/test/utils/fixtures/export/lts/export-003-dbErrors.json diff --git a/core/test/utils/fixtures/export/export-003-duplicate-posts.json b/core/test/utils/fixtures/export/lts/export-003-duplicate-posts.json similarity index 100% rename from core/test/utils/fixtures/export/export-003-duplicate-posts.json rename to core/test/utils/fixtures/export/lts/export-003-duplicate-posts.json diff --git a/core/test/utils/fixtures/export/export-003-duplicate-tags.json b/core/test/utils/fixtures/export/lts/export-003-duplicate-tags.json similarity index 100% rename from core/test/utils/fixtures/export/export-003-duplicate-tags.json rename to core/test/utils/fixtures/export/lts/export-003-duplicate-tags.json diff --git a/core/test/utils/fixtures/export/export-003-minimal.json b/core/test/utils/fixtures/export/lts/export-003-minimal.json similarity index 100% rename from core/test/utils/fixtures/export/export-003-minimal.json rename to core/test/utils/fixtures/export/lts/export-003-minimal.json diff --git a/core/test/utils/fixtures/export/export-003-mu-multipleOwner.json b/core/test/utils/fixtures/export/lts/export-003-mu-multipleOwner.json similarity index 100% rename from core/test/utils/fixtures/export/export-003-mu-multipleOwner.json rename to core/test/utils/fixtures/export/lts/export-003-mu-multipleOwner.json diff --git a/core/test/utils/fixtures/export/export-003-mu-noOwner.json b/core/test/utils/fixtures/export/lts/export-003-mu-noOwner.json similarity index 100% rename from core/test/utils/fixtures/export/export-003-mu-noOwner.json rename to core/test/utils/fixtures/export/lts/export-003-mu-noOwner.json diff --git a/core/test/utils/fixtures/export/export-003-mu-unknownAuthor.json b/core/test/utils/fixtures/export/lts/export-003-mu-unknownAuthor.json similarity index 100% rename from core/test/utils/fixtures/export/export-003-mu-unknownAuthor.json rename to core/test/utils/fixtures/export/lts/export-003-mu-unknownAuthor.json diff --git a/core/test/utils/fixtures/export/export-003-mu.json b/core/test/utils/fixtures/export/lts/export-003-mu.json similarity index 100% rename from core/test/utils/fixtures/export/export-003-mu.json rename to core/test/utils/fixtures/export/lts/export-003-mu.json diff --git a/core/test/utils/fixtures/export/export-003-nullPosts.json b/core/test/utils/fixtures/export/lts/export-003-nullPosts.json similarity index 100% rename from core/test/utils/fixtures/export/export-003-nullPosts.json rename to core/test/utils/fixtures/export/lts/export-003-nullPosts.json diff --git a/core/test/utils/fixtures/export/export-003-nullTags.json b/core/test/utils/fixtures/export/lts/export-003-nullTags.json similarity index 100% rename from core/test/utils/fixtures/export/export-003-nullTags.json rename to core/test/utils/fixtures/export/lts/export-003-nullTags.json diff --git a/core/test/utils/fixtures/export/export-003-wrongUUID.json b/core/test/utils/fixtures/export/lts/export-003-wrongUUID.json similarity index 100% rename from core/test/utils/fixtures/export/export-003-wrongUUID.json rename to core/test/utils/fixtures/export/lts/export-003-wrongUUID.json diff --git a/core/test/utils/fixtures/export/export-003.json b/core/test/utils/fixtures/export/lts/export-003.json similarity index 100% rename from core/test/utils/fixtures/export/export-003.json rename to core/test/utils/fixtures/export/lts/export-003.json diff --git a/core/test/utils/fixtures/export/export-004.json b/core/test/utils/fixtures/export/lts/export-004.json similarity index 100% rename from core/test/utils/fixtures/export/export-004.json rename to core/test/utils/fixtures/export/lts/export-004.json diff --git a/core/test/utils/fixtures/export/lts/export-lts-legacy-fields.json b/core/test/utils/fixtures/export/lts/export-lts-legacy-fields.json new file mode 100644 index 0000000000..c2f7249e69 --- /dev/null +++ b/core/test/utils/fixtures/export/lts/export-lts-legacy-fields.json @@ -0,0 +1,1630 @@ +{ + "meta": { + "exported_on": 1496145843289, + "version": "009" + }, + "data": { + "app_fields": [], + "app_settings": [], + "apps": [], + "permissions": [ + { + "id": 1, + "uuid": "35296344-9049-4f11-a8e8-649fb13ed144", + "name": "Export database", + "object_type": "db", + "action_type": "exportContent", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 2, + "uuid": "1cd39c03-79da-4330-8614-ca829916ef54", + "name": "Import database", + "object_type": "db", + "action_type": "importContent", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 3, + "uuid": "9fa6cef5-29e7-4844-9e63-d5d4e561ca81", + "name": "Delete all content", + "object_type": "db", + "action_type": "deleteAllContent", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 4, + "uuid": "1320f9a9-99d7-4fd0-b722-f979ac1735fb", + "name": "Send mail", + "object_type": "mail", + "action_type": "send", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 5, + "uuid": "e349a9b1-dd9f-4cb4-a8b6-c869c4109a89", + "name": "Browse notifications", + "object_type": "notification", + "action_type": "browse", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 6, + "uuid": "586874af-8930-49c5-8638-2186f76d703d", + "name": "Add notifications", + "object_type": "notification", + "action_type": "add", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 7, + "uuid": "c8b07790-266d-47c5-9521-e3c433299e82", + "name": "Delete notifications", + "object_type": "notification", + "action_type": "destroy", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 8, + "uuid": "00c4d69d-1930-4705-b23a-6d67df57d56e", + "name": "Browse posts", + "object_type": "post", + "action_type": "browse", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 9, + "uuid": "cdbc7bdc-4bba-4884-bb27-3ad04f12d6f5", + "name": "Read posts", + "object_type": "post", + "action_type": "read", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 10, + "uuid": "6bd5b490-bbaa-4bbd-8d6f-7300c6ee6a5b", + "name": "Edit posts", + "object_type": "post", + "action_type": "edit", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 11, + "uuid": "9c7f6522-b776-4d0f-bf01-2a59daf01acb", + "name": "Add posts", + "object_type": "post", + "action_type": "add", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 12, + "uuid": "b3f52b26-7844-4e07-8910-2cd0c9ea3810", + "name": "Delete posts", + "object_type": "post", + "action_type": "destroy", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 13, + "uuid": "c2f8a326-17c0-4d1e-af5e-f3d37187f7d1", + "name": "Browse settings", + "object_type": "setting", + "action_type": "browse", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 14, + "uuid": "00d1a492-a687-40ff-8932-b5fe9cc8048f", + "name": "Read settings", + "object_type": "setting", + "action_type": "read", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 15, + "uuid": "479bba86-aca2-4ebb-9c5f-c37b75e23d50", + "name": "Edit settings", + "object_type": "setting", + "action_type": "edit", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 16, + "uuid": "2992e2b2-8910-420f-90e7-94ab69604fd1", + "name": "Generate slugs", + "object_type": "slug", + "action_type": "generate", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 17, + "uuid": "7b3324dd-5e35-415c-bdae-89791a7c50b6", + "name": "Browse tags", + "object_type": "tag", + "action_type": "browse", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 18, + "uuid": "dd8d61a7-f9a3-45aa-8ddf-4453a5027a0e", + "name": "Read tags", + "object_type": "tag", + "action_type": "read", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 19, + "uuid": "2f8503cd-d404-42d7-9d9a-1dbe8cbc0dc0", + "name": "Edit tags", + "object_type": "tag", + "action_type": "edit", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 20, + "uuid": "12711f8c-0fc0-423c-86cb-59e6ad4c0b0c", + "name": "Add tags", + "object_type": "tag", + "action_type": "add", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 21, + "uuid": "3651cfc5-fbf9-4ffa-998a-9df9e1f41399", + "name": "Delete tags", + "object_type": "tag", + "action_type": "destroy", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 22, + "uuid": "9518a65b-d43a-447e-a9c6-17af32138da2", + "name": "Browse themes", + "object_type": "theme", + "action_type": "browse", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 23, + "uuid": "fb5e7352-7721-46b8-8efe-6ae4abb40cfc", + "name": "Edit themes", + "object_type": "theme", + "action_type": "edit", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 24, + "uuid": "4a816eb9-f203-426a-a270-1a24ee39af05", + "name": "Upload themes", + "object_type": "theme", + "action_type": "add", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 25, + "uuid": "3e3ed32c-347b-4d8c-a2b2-3ba088e5599a", + "name": "Download themes", + "object_type": "theme", + "action_type": "read", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 26, + "uuid": "f0d163be-7ec7-4559-ba7e-f7b97c93660f", + "name": "Delete themes", + "object_type": "theme", + "action_type": "destroy", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 27, + "uuid": "8edd0d96-8011-4cff-bce9-c2c6b1f9880b", + "name": "Browse users", + "object_type": "user", + "action_type": "browse", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 28, + "uuid": "2e2d8869-50a1-4a9e-bcf3-7921a1865587", + "name": "Read users", + "object_type": "user", + "action_type": "read", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 29, + "uuid": "18b31de3-6a12-43c2-a5f3-0046990e9fca", + "name": "Edit users", + "object_type": "user", + "action_type": "edit", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 30, + "uuid": "e377efc7-d805-4d73-97c6-df53a9a9afc3", + "name": "Add users", + "object_type": "user", + "action_type": "add", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 31, + "uuid": "847c0902-be4a-406a-82d4-6bf508b7dde3", + "name": "Delete users", + "object_type": "user", + "action_type": "destroy", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + }, + { + "id": 32, + "uuid": "6a8e07ad-be29-4f0d-9923-d41db96d65a4", + "name": "Assign a role", + "object_type": "role", + "action_type": "assign", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + }, + { + "id": 33, + "uuid": "20cb925a-89a1-4e43-a4c0-ded660103c06", + "name": "Browse roles", + "object_type": "role", + "action_type": "browse", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + }, + { + "id": 34, + "uuid": "afb80530-37f4-44ed-bd51-98cbb242cc01", + "name": "Browse clients", + "object_type": "client", + "action_type": "browse", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + }, + { + "id": 35, + "uuid": "4c7c013f-5512-42a9-9b31-1da087492137", + "name": "Read clients", + "object_type": "client", + "action_type": "read", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + }, + { + "id": 36, + "uuid": "6d725bd7-fe6e-4ff6-97a9-215f4fb6c231", + "name": "Edit clients", + "object_type": "client", + "action_type": "edit", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + }, + { + "id": 37, + "uuid": "41d808ae-2302-40f8-87f7-673c6c39d091", + "name": "Add clients", + "object_type": "client", + "action_type": "add", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + }, + { + "id": 38, + "uuid": "d231f1d9-f068-4951-9924-a596fffa37e4", + "name": "Delete clients", + "object_type": "client", + "action_type": "destroy", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + }, + { + "id": 39, + "uuid": "8a0a91bf-4059-47df-9113-3b61666c392d", + "name": "Browse subscribers", + "object_type": "subscriber", + "action_type": "browse", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + }, + { + "id": 40, + "uuid": "88c96dd0-036a-4569-9047-d7abd4806d87", + "name": "Read subscribers", + "object_type": "subscriber", + "action_type": "read", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + }, + { + "id": 41, + "uuid": "04bfa0d2-df4a-4f68-983d-48391d864fe1", + "name": "Edit subscribers", + "object_type": "subscriber", + "action_type": "edit", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + }, + { + "id": 42, + "uuid": "d4bfaa9c-ba97-4c4e-92a2-f7d9707fbd65", + "name": "Add subscribers", + "object_type": "subscriber", + "action_type": "add", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + }, + { + "id": 43, + "uuid": "f02cd225-07dd-47cc-90eb-eac2f541bbc3", + "name": "Delete subscribers", + "object_type": "subscriber", + "action_type": "destroy", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + } + ], + "permissions_apps": [], + "permissions_roles": [ + { + "id": 1, + "role_id": 1, + "permission_id": 1 + }, + { + "id": 2, + "role_id": 1, + "permission_id": 2 + }, + { + "id": 3, + "role_id": 1, + "permission_id": 3 + }, + { + "id": 4, + "role_id": 1, + "permission_id": 4 + }, + { + "id": 5, + "role_id": 1, + "permission_id": 5 + }, + { + "id": 6, + "role_id": 1, + "permission_id": 6 + }, + { + "id": 7, + "role_id": 1, + "permission_id": 7 + }, + { + "id": 8, + "role_id": 1, + "permission_id": 8 + }, + { + "id": 9, + "role_id": 1, + "permission_id": 9 + }, + { + "id": 10, + "role_id": 1, + "permission_id": 10 + }, + { + "id": 11, + "role_id": 1, + "permission_id": 11 + }, + { + "id": 12, + "role_id": 1, + "permission_id": 12 + }, + { + "id": 13, + "role_id": 1, + "permission_id": 13 + }, + { + "id": 14, + "role_id": 1, + "permission_id": 14 + }, + { + "id": 15, + "role_id": 1, + "permission_id": 15 + }, + { + "id": 16, + "role_id": 1, + "permission_id": 16 + }, + { + "id": 17, + "role_id": 1, + "permission_id": 17 + }, + { + "id": 18, + "role_id": 1, + "permission_id": 18 + }, + { + "id": 19, + "role_id": 1, + "permission_id": 19 + }, + { + "id": 20, + "role_id": 1, + "permission_id": 20 + }, + { + "id": 21, + "role_id": 1, + "permission_id": 21 + }, + { + "id": 22, + "role_id": 1, + "permission_id": 22 + }, + { + "id": 23, + "role_id": 1, + "permission_id": 23 + }, + { + "id": 24, + "role_id": 1, + "permission_id": 24 + }, + { + "id": 25, + "role_id": 1, + "permission_id": 25 + }, + { + "id": 26, + "role_id": 1, + "permission_id": 26 + }, + { + "id": 27, + "role_id": 1, + "permission_id": 27 + }, + { + "id": 28, + "role_id": 1, + "permission_id": 28 + }, + { + "id": 29, + "role_id": 1, + "permission_id": 29 + }, + { + "id": 30, + "role_id": 1, + "permission_id": 30 + }, + { + "id": 31, + "role_id": 1, + "permission_id": 31 + }, + { + "id": 32, + "role_id": 1, + "permission_id": 32 + }, + { + "id": 33, + "role_id": 1, + "permission_id": 33 + }, + { + "id": 34, + "role_id": 1, + "permission_id": 34 + }, + { + "id": 35, + "role_id": 1, + "permission_id": 35 + }, + { + "id": 36, + "role_id": 1, + "permission_id": 36 + }, + { + "id": 37, + "role_id": 1, + "permission_id": 37 + }, + { + "id": 38, + "role_id": 1, + "permission_id": 38 + }, + { + "id": 39, + "role_id": 1, + "permission_id": 39 + }, + { + "id": 40, + "role_id": 1, + "permission_id": 40 + }, + { + "id": 41, + "role_id": 1, + "permission_id": 41 + }, + { + "id": 42, + "role_id": 1, + "permission_id": 42 + }, + { + "id": 43, + "role_id": 1, + "permission_id": 43 + }, + { + "id": 44, + "role_id": 2, + "permission_id": 8 + }, + { + "id": 45, + "role_id": 2, + "permission_id": 9 + }, + { + "id": 46, + "role_id": 2, + "permission_id": 10 + }, + { + "id": 47, + "role_id": 2, + "permission_id": 11 + }, + { + "id": 48, + "role_id": 2, + "permission_id": 12 + }, + { + "id": 49, + "role_id": 2, + "permission_id": 13 + }, + { + "id": 50, + "role_id": 2, + "permission_id": 14 + }, + { + "id": 51, + "role_id": 2, + "permission_id": 16 + }, + { + "id": 52, + "role_id": 2, + "permission_id": 17 + }, + { + "id": 53, + "role_id": 2, + "permission_id": 18 + }, + { + "id": 54, + "role_id": 2, + "permission_id": 19 + }, + { + "id": 55, + "role_id": 2, + "permission_id": 20 + }, + { + "id": 56, + "role_id": 2, + "permission_id": 21 + }, + { + "id": 57, + "role_id": 2, + "permission_id": 27 + }, + { + "id": 58, + "role_id": 2, + "permission_id": 28 + }, + { + "id": 59, + "role_id": 2, + "permission_id": 29 + }, + { + "id": 60, + "role_id": 2, + "permission_id": 30 + }, + { + "id": 61, + "role_id": 2, + "permission_id": 31 + }, + { + "id": 62, + "role_id": 2, + "permission_id": 32 + }, + { + "id": 63, + "role_id": 2, + "permission_id": 33 + }, + { + "id": 64, + "role_id": 2, + "permission_id": 34 + }, + { + "id": 65, + "role_id": 2, + "permission_id": 35 + }, + { + "id": 66, + "role_id": 2, + "permission_id": 36 + }, + { + "id": 67, + "role_id": 2, + "permission_id": 37 + }, + { + "id": 68, + "role_id": 2, + "permission_id": 38 + }, + { + "id": 69, + "role_id": 2, + "permission_id": 42 + }, + { + "id": 70, + "role_id": 3, + "permission_id": 8 + }, + { + "id": 71, + "role_id": 3, + "permission_id": 9 + }, + { + "id": 72, + "role_id": 3, + "permission_id": 11 + }, + { + "id": 73, + "role_id": 3, + "permission_id": 13 + }, + { + "id": 74, + "role_id": 3, + "permission_id": 14 + }, + { + "id": 75, + "role_id": 3, + "permission_id": 16 + }, + { + "id": 76, + "role_id": 3, + "permission_id": 17 + }, + { + "id": 77, + "role_id": 3, + "permission_id": 18 + }, + { + "id": 78, + "role_id": 3, + "permission_id": 20 + }, + { + "id": 79, + "role_id": 3, + "permission_id": 27 + }, + { + "id": 80, + "role_id": 3, + "permission_id": 28 + }, + { + "id": 81, + "role_id": 3, + "permission_id": 33 + }, + { + "id": 82, + "role_id": 3, + "permission_id": 34 + }, + { + "id": 83, + "role_id": 3, + "permission_id": 35 + }, + { + "id": 84, + "role_id": 3, + "permission_id": 36 + }, + { + "id": 85, + "role_id": 3, + "permission_id": 37 + }, + { + "id": 86, + "role_id": 3, + "permission_id": 38 + }, + { + "id": 87, + "role_id": 3, + "permission_id": 42 + } + ], + "permissions_users": [], + "posts": [ + { + "id": 4751, + "uuid": "c2ef3b5e-4b48-496b-8a35-ecb04fb5f8a0", + "title": "Welcome to this test import. This post has a long title.", + "slug": "welcome-to-this-test-import-this-post-has-a-long-title", + "markdown": "Welcome to this test import. This post has a long title.", + "mobiledoc": null, + "html": "

Welcome to this test import. This post has a long title.

", + "amp": null, + "image": "/content/images/2017/05/post-image.jpg", + "featured": 0, + "page": 0, + "status": "draft", + "language": "en_US", + "visibility": "public", + "meta_title": null, + "meta_description": null, + "author_id": 1, + "created_at": "2017-05-20T08:42:02.000Z", + "created_by": 1, + "updated_at": "2017-05-20T12:01:52.000Z", + "updated_by": 1, + "published_at": null, + "published_by": null + }, + { + "id": 4752, + "uuid": "277bbc97-2470-484c-b979-45bce515de46", + "title": "About", + "slug": "about", + "markdown": "This is a draft static page", + "mobiledoc": null, + "html": "

This is a draft static page

", + "amp": null, + "image": null, + "featured": 0, + "page": 1, + "status": "draft", + "language": "en_US", + "visibility": "public", + "meta_title": null, + "meta_description": null, + "author_id": 1, + "created_at": "2017-05-21T10:39:50.000Z", + "created_by": 1, + "updated_at": "2017-05-21T10:40:50.000Z", + "updated_by": 1, + "published_at": null, + "published_by": null + }, + { + "id": 4753, + "uuid": "a8bf79a3-7252-4feb-ad81-d206fa802f9b", + "title": "Published post", + "slug": "published-post", + "markdown": "This is a published post", + "mobiledoc": null, + "html": "

This is a published post

", + "amp": null, + "image": null, + "featured": 0, + "page": 0, + "status": "draft", + "language": "en_US", + "visibility": "public", + "meta_title": null, + "meta_description": null, + "author_id": 1, + "created_at": "2017-05-22T10:40:27.000Z", + "created_by": 1, + "updated_at": "2017-05-22T10:40:37.000Z", + "updated_by": 1, + "published_at": null, + "published_by": null + }, + { + "id": 4754, + "uuid": "a6dbe1cb-affb-4d62-b69a-6244abf5681c", + "title": "Welcome", + "slug": "welcome", + "markdown": "This is a published static page", + "mobiledoc": null, + "html": "

This is a published static page

", + "amp": null, + "image": null, + "featured": 0, + "page": 0, + "status": "published", + "language": "en_US", + "visibility": "public", + "meta_title": null, + "meta_description": null, + "author_id": 1, + "created_at": "2017-05-23T10:40:59.000Z", + "created_by": 1, + "updated_at": "2017-05-23T10:41:09.000Z", + "updated_by": 1, + "published_at": "2017-05-23T10:41:09.000Z", + "published_by": 1 + }, + { + "id": 4755, + "uuid": "3be3404b-8474-4789-8c6e-48bbea11c509", + "title": "Scheduled post", + "slug": "scheduled-post", + "markdown": "This a post scheduled for publication", + "mobiledoc": null, + "html": "

This a post scheduled for publication

", + "amp": null, + "image": null, + "featured": 0, + "page": 0, + "status": "scheduled", + "language": "en_US", + "visibility": "public", + "meta_title": null, + "meta_description": null, + "author_id": 1, + "created_at": "2017-05-24T10:41:19.000Z", + "created_by": 1, + "updated_at": "2017-05-24T10:42:15.000Z", + "updated_by": 1, + "published_at": "2017-08-24T10:41:00.000Z", + "published_by": null + } + ], + "posts_tags": [ + { + "id": 3002, + "post_id": 4751, + "tag_id": 1029, + "sort_order": 0 + } + ], + "roles": [ + { + "id": 1, + "uuid": "57644e26-9a9b-46dd-8b4e-26d373699da1", + "name": "Administrator", + "description": "Administrators", + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 2, + "uuid": "faffb323-46b1-45c7-a204-b16b9cb67b4f", + "name": "Editor", + "description": "Editors", + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 3, + "uuid": "20d35c2f-29a1-4713-b885-b784c8941832", + "name": "Author", + "description": "Authors", + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 4, + "uuid": "a064aaf1-ac17-402b-a0ce-a790836ac607", + "name": "Owner", + "description": "Blog Owner", + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + } + ], + "roles_users": [ + { + "id": 1, + "role_id": 4, + "user_id": 1 + }, + { + "id": 2, + "role_id": 3, + "user_id": 2 + }, + { + "id": 3, + "role_id": 3, + "user_id": 3 + }, + { + "id": 4, + "role_id": 3, + "user_id": 4 + }, + { + "id": 5, + "role_id": 3, + "user_id": 5 + }, + { + "id": 6, + "role_id": 3, + "user_id": 6 + }, + { + "id": 7, + "role_id": 3, + "user_id": 7 + }, + { + "id": 8, + "role_id": 3, + "user_id": 8 + }, + { + "id": 9, + "role_id": 3, + "user_id": 9 + }, + { + "id": 10, + "role_id": 3, + "user_id": 10 + }, + { + "id": 11, + "role_id": 3, + "user_id": 11 + }, + { + "id": 12, + "role_id": 3, + "user_id": 12 + }, + { + "id": 13, + "role_id": 3, + "user_id": 13 + }, + { + "id": 14, + "role_id": 3, + "user_id": 14 + }, + { + "id": 29, + "role_id": 3, + "user_id": 29 + }, + { + "id": 30, + "role_id": 3, + "user_id": 30 + }, + { + "id": 31, + "role_id": 3, + "user_id": 31 + }, + { + "id": 32, + "role_id": 3, + "user_id": 32 + }, + { + "id": 33, + "role_id": 3, + "user_id": 33 + }, + { + "id": 34, + "role_id": 3, + "user_id": 34 + }, + { + "id": 35, + "role_id": 3, + "user_id": 35 + }, + { + "id": 36, + "role_id": 1, + "user_id": 36 + }, + { + "id": 37, + "role_id": 3, + "user_id": 37 + }, + { + "id": 1082, + "role_id": 2, + "user_id": 1208 + }, + { + "id": 1083, + "role_id": 3, + "user_id": 1209 + } + ], + "settings": [ + { + "id": 1, + "uuid": "82a9a5bc-efe6-48df-bc65-86a12cc998ff", + "key": "databaseVersion", + "value": "009", + "type": "core", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:36.000Z", + "updated_by": 1 + }, + { + "id": 2, + "uuid": "ec04fd09-b3ec-4796-a808-746888b9d183", + "key": "dbHash", + "value": "0c664583-f1b5-42a3-829d-1ab234626b54", + "type": "core", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:36.000Z", + "updated_by": 1 + }, + { + "id": 3, + "uuid": "f72bcee1-75e4-475d-a5a2-91e11bb6f505", + "key": "nextUpdateCheck", + "value": null, + "type": "core", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:36.000Z", + "updated_by": 1 + }, + { + "id": 4, + "uuid": "99c53971-28cd-4609-afc6-def7cf6802f3", + "key": "displayUpdateNotification", + "value": null, + "type": "core", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:36.000Z", + "updated_by": 1 + }, + { + "id": 5, + "uuid": "39134372-0b97-4e00-aa57-2d3a4fd87229", + "key": "seenNotifications", + "value": "[]", + "type": "core", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:36.000Z", + "updated_by": 1 + }, + { + "id": 6, + "uuid": "df6fca03-3248-48c7-92ef-c1d808e6ffe3", + "key": "migrations", + "value": "{}", + "type": "core", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:36.000Z", + "updated_by": 1 + }, + { + "id": 7, + "uuid": "30ce73ad-a601-4ceb-9703-21af19f563bc", + "key": "title", + "value": "LTS blog", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 8, + "uuid": "c7167c6e-abfb-4977-bba4-00836a871f76", + "key": "description", + "value": "Just a blogging platform.", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 9, + "uuid": "83a78eec-1f12-4ef1-8e3e-83b95206f076", + "key": "logo", + "value": "/content/images/2017/05/bloglogo.jpeg", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 10, + "uuid": "2333af7a-ee4e-401b-9134-f3c62a770373", + "key": "cover", + "value": "/content/images/2017/05/blogcover.jpeg", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 11, + "uuid": "d7ecebc5-8513-4c04-bf45-ea8457d21c7a", + "key": "defaultLang", + "value": "en_US", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 12, + "uuid": "d0826db3-687d-4338-802f-f353de656490", + "key": "postsPerPage", + "value": "5", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 13, + "uuid": "e3628791-f446-49f6-9dc6-80b4198b2b44", + "key": "activeTimezone", + "value": "Etc/UTC", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 14, + "uuid": "d65fa4b9-b64b-43a6-b936-2c90346b4ed1", + "key": "forceI18n", + "value": "true", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 15, + "uuid": "c8a10432-9391-428f-8735-061ee3545f8b", + "key": "permalinks", + "value": "/:year/:month/:day/:slug/", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 16, + "uuid": "7f11112f-95b1-49aa-bdf6-9fb4ac65d074", + "key": "ghost_head", + "value": "", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 17, + "uuid": "cc5b524e-1186-4ff8-bd4b-fdfded4ba05b", + "key": "ghost_foot", + "value": "", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 18, + "uuid": "46ebfbf3-895e-4f7f-a98f-bb9c168bc10e", + "key": "facebook", + "value": "", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 19, + "uuid": "c9010813-f1db-4523-a6c0-282aa0d3d5f3", + "key": "twitter", + "value": "", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 20, + "uuid": "a1476e4c-f05f-48c1-80ea-35a242210db7", + "key": "labs", + "value": "{}", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 21, + "uuid": "dc6da094-2b49-4601-965f-a52bbf842b0d", + "key": "navigation", + "value": "[{\"label\":\"Home\",\"url\":\"/\"}]", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 22, + "uuid": "82669b03-9807-42a6-b6ff-08e19cab4c22", + "key": "slack", + "value": "[{\"url\":\"\"}]", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 23, + "uuid": "b94edd9a-6cbe-4498-98cc-920ba763b773", + "key": "activeApps", + "value": "[]", + "type": "app", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2016-10-28T14:15:49.000Z", + "updated_by": 1 + }, + { + "id": 24, + "uuid": "1a0f6186-b709-4c2f-a673-6f7531803af3", + "key": "installedApps", + "value": "[]", + "type": "app", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T11:36:59.000Z", + "updated_by": 1 + }, + { + "id": 25, + "uuid": "83730573-cc5a-4989-b3d3-df48aaf54396", + "key": "isPrivate", + "value": "true", + "type": "private", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 26, + "uuid": "2d364cdb-06c3-4760-bcdb-a81a6fbe6a41", + "key": "password", + "value": "privateBlogPassword", + "type": "private", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 27, + "uuid": "feceb99d-09f0-437c-ba5b-3e250d89d498", + "key": "activeTheme", + "value": "casper", + "type": "theme", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 28, + "uuid": "bd24dc02-9705-48c2-babd-3f63a865b209", + "key": "amp", + "value": "true", + "type": "blog", + "created_at": "2017-01-15T13:49:03.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + } + ], + "subscribers": [], + "tags": [ + { + "id": 1029, + "uuid": "1bbc4d06-5d6e-4960-85f7-2ca3b8f9406c", + "name": "tag1", + "slug": "tag1", + "description": null, + "image": "/content/images/2017/05/tagImage-1.jpeg", + "parent_id": null, + "visibility": "public", + "meta_title": null, + "meta_description": null, + "created_at": "2017-05-30T08:44:09.000Z", + "created_by": 36, + "updated_at": "2017-05-30T12:03:10.000Z", + "updated_by": 1 + } + ], + "users": [ + { + "id": 1, + "uuid": "1e2a7354-f580-4deb-9801-ca286628125a", + "name": "Joe Blogg's Brother", + "slug": "joe-bloggs-brother", + "password": "$2a$10$.pZeeBE0gHXd0PTnbT/ph.GEKgd0Wd3q2pWna3ynTGBkPKnGIKABC", + "email": "jbloggsbrother@example.com", + "image": "/content/images/2017/05/authorlogo.jpeg", + "cover": "/content/images/2017/05/authorcover.jpeg", + "bio": "I'm Joe's brother, the good looking one!", + "website": "http://joebloggsbrother.com", + "location": null, + "facebook": null, + "twitter": null, + "accessibility": null, + "status": "active", + "language": "en_US", + "visibility": "public", + "meta_title": null, + "meta_description": null, + "tour": null, + "last_login": "2017-05-30T10:39:32.000Z", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:02:35.000Z", + "updated_by": 1 + } + ] + } +} diff --git a/core/test/utils/fixtures/export/lts/export-lts-style-bad-markdown-html.json b/core/test/utils/fixtures/export/lts/export-lts-style-bad-markdown-html.json new file mode 100644 index 0000000000..8d5e323d85 --- /dev/null +++ b/core/test/utils/fixtures/export/lts/export-lts-style-bad-markdown-html.json @@ -0,0 +1,1629 @@ +{ + "meta": { + "exported_on": 1496145843289, + "version": "009" + }, + "data": { + "app_fields": [], + "app_settings": [], + "apps": [], + "permissions": [ + { + "id": 1, + "uuid": "35296344-9049-4f11-a8e8-649fb13ed144", + "name": "Export database", + "object_type": "db", + "action_type": "exportContent", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 2, + "uuid": "1cd39c03-79da-4330-8614-ca829916ef54", + "name": "Import database", + "object_type": "db", + "action_type": "importContent", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 3, + "uuid": "9fa6cef5-29e7-4844-9e63-d5d4e561ca81", + "name": "Delete all content", + "object_type": "db", + "action_type": "deleteAllContent", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 4, + "uuid": "1320f9a9-99d7-4fd0-b722-f979ac1735fb", + "name": "Send mail", + "object_type": "mail", + "action_type": "send", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 5, + "uuid": "e349a9b1-dd9f-4cb4-a8b6-c869c4109a89", + "name": "Browse notifications", + "object_type": "notification", + "action_type": "browse", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 6, + "uuid": "586874af-8930-49c5-8638-2186f76d703d", + "name": "Add notifications", + "object_type": "notification", + "action_type": "add", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 7, + "uuid": "c8b07790-266d-47c5-9521-e3c433299e82", + "name": "Delete notifications", + "object_type": "notification", + "action_type": "destroy", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 8, + "uuid": "00c4d69d-1930-4705-b23a-6d67df57d56e", + "name": "Browse posts", + "object_type": "post", + "action_type": "browse", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 9, + "uuid": "cdbc7bdc-4bba-4884-bb27-3ad04f12d6f5", + "name": "Read posts", + "object_type": "post", + "action_type": "read", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 10, + "uuid": "6bd5b490-bbaa-4bbd-8d6f-7300c6ee6a5b", + "name": "Edit posts", + "object_type": "post", + "action_type": "edit", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 11, + "uuid": "9c7f6522-b776-4d0f-bf01-2a59daf01acb", + "name": "Add posts", + "object_type": "post", + "action_type": "add", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 12, + "uuid": "b3f52b26-7844-4e07-8910-2cd0c9ea3810", + "name": "Delete posts", + "object_type": "post", + "action_type": "destroy", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 13, + "uuid": "c2f8a326-17c0-4d1e-af5e-f3d37187f7d1", + "name": "Browse settings", + "object_type": "setting", + "action_type": "browse", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 14, + "uuid": "00d1a492-a687-40ff-8932-b5fe9cc8048f", + "name": "Read settings", + "object_type": "setting", + "action_type": "read", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 15, + "uuid": "479bba86-aca2-4ebb-9c5f-c37b75e23d50", + "name": "Edit settings", + "object_type": "setting", + "action_type": "edit", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 16, + "uuid": "2992e2b2-8910-420f-90e7-94ab69604fd1", + "name": "Generate slugs", + "object_type": "slug", + "action_type": "generate", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 17, + "uuid": "7b3324dd-5e35-415c-bdae-89791a7c50b6", + "name": "Browse tags", + "object_type": "tag", + "action_type": "browse", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 18, + "uuid": "dd8d61a7-f9a3-45aa-8ddf-4453a5027a0e", + "name": "Read tags", + "object_type": "tag", + "action_type": "read", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 19, + "uuid": "2f8503cd-d404-42d7-9d9a-1dbe8cbc0dc0", + "name": "Edit tags", + "object_type": "tag", + "action_type": "edit", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 20, + "uuid": "12711f8c-0fc0-423c-86cb-59e6ad4c0b0c", + "name": "Add tags", + "object_type": "tag", + "action_type": "add", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 21, + "uuid": "3651cfc5-fbf9-4ffa-998a-9df9e1f41399", + "name": "Delete tags", + "object_type": "tag", + "action_type": "destroy", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 22, + "uuid": "9518a65b-d43a-447e-a9c6-17af32138da2", + "name": "Browse themes", + "object_type": "theme", + "action_type": "browse", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 23, + "uuid": "fb5e7352-7721-46b8-8efe-6ae4abb40cfc", + "name": "Edit themes", + "object_type": "theme", + "action_type": "edit", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 24, + "uuid": "4a816eb9-f203-426a-a270-1a24ee39af05", + "name": "Upload themes", + "object_type": "theme", + "action_type": "add", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 25, + "uuid": "3e3ed32c-347b-4d8c-a2b2-3ba088e5599a", + "name": "Download themes", + "object_type": "theme", + "action_type": "read", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 26, + "uuid": "f0d163be-7ec7-4559-ba7e-f7b97c93660f", + "name": "Delete themes", + "object_type": "theme", + "action_type": "destroy", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 27, + "uuid": "8edd0d96-8011-4cff-bce9-c2c6b1f9880b", + "name": "Browse users", + "object_type": "user", + "action_type": "browse", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 28, + "uuid": "2e2d8869-50a1-4a9e-bcf3-7921a1865587", + "name": "Read users", + "object_type": "user", + "action_type": "read", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 29, + "uuid": "18b31de3-6a12-43c2-a5f3-0046990e9fca", + "name": "Edit users", + "object_type": "user", + "action_type": "edit", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 30, + "uuid": "e377efc7-d805-4d73-97c6-df53a9a9afc3", + "name": "Add users", + "object_type": "user", + "action_type": "add", + "object_id": null, + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 31, + "uuid": "847c0902-be4a-406a-82d4-6bf508b7dde3", + "name": "Delete users", + "object_type": "user", + "action_type": "destroy", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + }, + { + "id": 32, + "uuid": "6a8e07ad-be29-4f0d-9923-d41db96d65a4", + "name": "Assign a role", + "object_type": "role", + "action_type": "assign", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + }, + { + "id": 33, + "uuid": "20cb925a-89a1-4e43-a4c0-ded660103c06", + "name": "Browse roles", + "object_type": "role", + "action_type": "browse", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + }, + { + "id": 34, + "uuid": "afb80530-37f4-44ed-bd51-98cbb242cc01", + "name": "Browse clients", + "object_type": "client", + "action_type": "browse", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + }, + { + "id": 35, + "uuid": "4c7c013f-5512-42a9-9b31-1da087492137", + "name": "Read clients", + "object_type": "client", + "action_type": "read", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + }, + { + "id": 36, + "uuid": "6d725bd7-fe6e-4ff6-97a9-215f4fb6c231", + "name": "Edit clients", + "object_type": "client", + "action_type": "edit", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + }, + { + "id": 37, + "uuid": "41d808ae-2302-40f8-87f7-673c6c39d091", + "name": "Add clients", + "object_type": "client", + "action_type": "add", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + }, + { + "id": 38, + "uuid": "d231f1d9-f068-4951-9924-a596fffa37e4", + "name": "Delete clients", + "object_type": "client", + "action_type": "destroy", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + }, + { + "id": 39, + "uuid": "8a0a91bf-4059-47df-9113-3b61666c392d", + "name": "Browse subscribers", + "object_type": "subscriber", + "action_type": "browse", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + }, + { + "id": 40, + "uuid": "88c96dd0-036a-4569-9047-d7abd4806d87", + "name": "Read subscribers", + "object_type": "subscriber", + "action_type": "read", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + }, + { + "id": 41, + "uuid": "04bfa0d2-df4a-4f68-983d-48391d864fe1", + "name": "Edit subscribers", + "object_type": "subscriber", + "action_type": "edit", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + }, + { + "id": 42, + "uuid": "d4bfaa9c-ba97-4c4e-92a2-f7d9707fbd65", + "name": "Add subscribers", + "object_type": "subscriber", + "action_type": "add", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + }, + { + "id": 43, + "uuid": "f02cd225-07dd-47cc-90eb-eac2f541bbc3", + "name": "Delete subscribers", + "object_type": "subscriber", + "action_type": "destroy", + "object_id": null, + "created_at": "2016-10-28T13:43:35.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:35.000Z", + "updated_by": 1 + } + ], + "permissions_apps": [], + "permissions_roles": [ + { + "id": 1, + "role_id": 1, + "permission_id": 1 + }, + { + "id": 2, + "role_id": 1, + "permission_id": 2 + }, + { + "id": 3, + "role_id": 1, + "permission_id": 3 + }, + { + "id": 4, + "role_id": 1, + "permission_id": 4 + }, + { + "id": 5, + "role_id": 1, + "permission_id": 5 + }, + { + "id": 6, + "role_id": 1, + "permission_id": 6 + }, + { + "id": 7, + "role_id": 1, + "permission_id": 7 + }, + { + "id": 8, + "role_id": 1, + "permission_id": 8 + }, + { + "id": 9, + "role_id": 1, + "permission_id": 9 + }, + { + "id": 10, + "role_id": 1, + "permission_id": 10 + }, + { + "id": 11, + "role_id": 1, + "permission_id": 11 + }, + { + "id": 12, + "role_id": 1, + "permission_id": 12 + }, + { + "id": 13, + "role_id": 1, + "permission_id": 13 + }, + { + "id": 14, + "role_id": 1, + "permission_id": 14 + }, + { + "id": 15, + "role_id": 1, + "permission_id": 15 + }, + { + "id": 16, + "role_id": 1, + "permission_id": 16 + }, + { + "id": 17, + "role_id": 1, + "permission_id": 17 + }, + { + "id": 18, + "role_id": 1, + "permission_id": 18 + }, + { + "id": 19, + "role_id": 1, + "permission_id": 19 + }, + { + "id": 20, + "role_id": 1, + "permission_id": 20 + }, + { + "id": 21, + "role_id": 1, + "permission_id": 21 + }, + { + "id": 22, + "role_id": 1, + "permission_id": 22 + }, + { + "id": 23, + "role_id": 1, + "permission_id": 23 + }, + { + "id": 24, + "role_id": 1, + "permission_id": 24 + }, + { + "id": 25, + "role_id": 1, + "permission_id": 25 + }, + { + "id": 26, + "role_id": 1, + "permission_id": 26 + }, + { + "id": 27, + "role_id": 1, + "permission_id": 27 + }, + { + "id": 28, + "role_id": 1, + "permission_id": 28 + }, + { + "id": 29, + "role_id": 1, + "permission_id": 29 + }, + { + "id": 30, + "role_id": 1, + "permission_id": 30 + }, + { + "id": 31, + "role_id": 1, + "permission_id": 31 + }, + { + "id": 32, + "role_id": 1, + "permission_id": 32 + }, + { + "id": 33, + "role_id": 1, + "permission_id": 33 + }, + { + "id": 34, + "role_id": 1, + "permission_id": 34 + }, + { + "id": 35, + "role_id": 1, + "permission_id": 35 + }, + { + "id": 36, + "role_id": 1, + "permission_id": 36 + }, + { + "id": 37, + "role_id": 1, + "permission_id": 37 + }, + { + "id": 38, + "role_id": 1, + "permission_id": 38 + }, + { + "id": 39, + "role_id": 1, + "permission_id": 39 + }, + { + "id": 40, + "role_id": 1, + "permission_id": 40 + }, + { + "id": 41, + "role_id": 1, + "permission_id": 41 + }, + { + "id": 42, + "role_id": 1, + "permission_id": 42 + }, + { + "id": 43, + "role_id": 1, + "permission_id": 43 + }, + { + "id": 44, + "role_id": 2, + "permission_id": 8 + }, + { + "id": 45, + "role_id": 2, + "permission_id": 9 + }, + { + "id": 46, + "role_id": 2, + "permission_id": 10 + }, + { + "id": 47, + "role_id": 2, + "permission_id": 11 + }, + { + "id": 48, + "role_id": 2, + "permission_id": 12 + }, + { + "id": 49, + "role_id": 2, + "permission_id": 13 + }, + { + "id": 50, + "role_id": 2, + "permission_id": 14 + }, + { + "id": 51, + "role_id": 2, + "permission_id": 16 + }, + { + "id": 52, + "role_id": 2, + "permission_id": 17 + }, + { + "id": 53, + "role_id": 2, + "permission_id": 18 + }, + { + "id": 54, + "role_id": 2, + "permission_id": 19 + }, + { + "id": 55, + "role_id": 2, + "permission_id": 20 + }, + { + "id": 56, + "role_id": 2, + "permission_id": 21 + }, + { + "id": 57, + "role_id": 2, + "permission_id": 27 + }, + { + "id": 58, + "role_id": 2, + "permission_id": 28 + }, + { + "id": 59, + "role_id": 2, + "permission_id": 29 + }, + { + "id": 60, + "role_id": 2, + "permission_id": 30 + }, + { + "id": 61, + "role_id": 2, + "permission_id": 31 + }, + { + "id": 62, + "role_id": 2, + "permission_id": 32 + }, + { + "id": 63, + "role_id": 2, + "permission_id": 33 + }, + { + "id": 64, + "role_id": 2, + "permission_id": 34 + }, + { + "id": 65, + "role_id": 2, + "permission_id": 35 + }, + { + "id": 66, + "role_id": 2, + "permission_id": 36 + }, + { + "id": 67, + "role_id": 2, + "permission_id": 37 + }, + { + "id": 68, + "role_id": 2, + "permission_id": 38 + }, + { + "id": 69, + "role_id": 2, + "permission_id": 42 + }, + { + "id": 70, + "role_id": 3, + "permission_id": 8 + }, + { + "id": 71, + "role_id": 3, + "permission_id": 9 + }, + { + "id": 72, + "role_id": 3, + "permission_id": 11 + }, + { + "id": 73, + "role_id": 3, + "permission_id": 13 + }, + { + "id": 74, + "role_id": 3, + "permission_id": 14 + }, + { + "id": 75, + "role_id": 3, + "permission_id": 16 + }, + { + "id": 76, + "role_id": 3, + "permission_id": 17 + }, + { + "id": 77, + "role_id": 3, + "permission_id": 18 + }, + { + "id": 78, + "role_id": 3, + "permission_id": 20 + }, + { + "id": 79, + "role_id": 3, + "permission_id": 27 + }, + { + "id": 80, + "role_id": 3, + "permission_id": 28 + }, + { + "id": 81, + "role_id": 3, + "permission_id": 33 + }, + { + "id": 82, + "role_id": 3, + "permission_id": 34 + }, + { + "id": 83, + "role_id": 3, + "permission_id": 35 + }, + { + "id": 84, + "role_id": 3, + "permission_id": 36 + }, + { + "id": 85, + "role_id": 3, + "permission_id": 37 + }, + { + "id": 86, + "role_id": 3, + "permission_id": 38 + }, + { + "id": 87, + "role_id": 3, + "permission_id": 42 + } + ], + "permissions_users": [], + "posts": [ + { + "id": 4756, + "uuid": "3be3404b-8474-4789-8c6e-48bbea11c509", + "title": "Scheduled post 2 empty markdown", + "slug": "scheduled-post2", + "markdown": "", + "mobiledoc": null, + "html": "

This a post scheduled for publication

", + "amp": null, + "image": null, + "featured": 0, + "page": 0, + "status": "scheduled", + "language": "en_US", + "visibility": "public", + "meta_title": null, + "meta_description": null, + "author_id": 1, + "created_at": "2017-05-26T10:41:19.000Z", + "created_by": 1, + "updated_at": "2017-05-26T10:42:15.000Z", + "updated_by": 1, + "published_at": "2017-08-26T10:41:00.000Z", + "published_by": null + }, + { + "id": 4757, + "uuid": "3be3404b-8474-4789-8c6e-48bbea11c509", + "title": "Scheduled post 3 null markdown", + "slug": "scheduled-post3", + "markdown": null, + "mobiledoc": null, + "html": "

This a post scheduled for publication

", + "amp": null, + "image": null, + "featured": 0, + "page": 0, + "status": "scheduled", + "language": "en_US", + "visibility": "public", + "meta_title": null, + "meta_description": null, + "author_id": 1, + "created_at": "2017-05-27T10:41:19.000Z", + "created_by": 1, + "updated_at": "2017-05-27T10:42:15.000Z", + "updated_by": 1, + "published_at": "2017-08-27T10:41:00.000Z", + "published_by": null + }, + { + "id": 4758, + "uuid": "3be3404b-8474-4789-8c6e-48bbea11c509", + "title": "Scheduled post 4 no html or markdown", + "slug": "scheduled-post4", + "markdown": null, + "mobiledoc": null, + "html": "", + "amp": null, + "image": null, + "featured": 0, + "page": 0, + "status": "scheduled", + "language": "en_US", + "visibility": "public", + "meta_title": null, + "meta_description": null, + "author_id": 1, + "created_at": "2017-05-28T10:41:19.000Z", + "created_by": 1, + "updated_at": "2017-05-28T10:42:15.000Z", + "updated_by": 1, + "published_at": "2017-08-28T10:41:00.000Z", + "published_by": null + }, + { + "id": 4759, + "uuid": "3be3404b-8474-4789-8c6e-48bbea11c509", + "title": "Scheduled post 5 null html and markdown", + "slug": "scheduled-post5", + "markdown": null, + "mobiledoc": null, + "html": null, + "amp": null, + "image": null, + "featured": 0, + "page": 0, + "status": "scheduled", + "language": "en_US", + "visibility": "public", + "meta_title": null, + "meta_description": null, + "author_id": 1, + "created_at": "2017-05-29T10:41:19.000Z", + "created_by": 1, + "updated_at": "2017-05-29T10:42:15.000Z", + "updated_by": 1, + "published_at": "2017-08-29T10:41:00.000Z", + "published_by": null + }, + { + "id": 4760, + "uuid": "3be3404b-8474-4789-8c6e-48bbea11c509", + "title": "Scheduled post 6 no mobiledoc field", + "slug": "scheduled-post6", + "markdown": "This a post scheduled for publication", + "html": null, + "amp": null, + "image": null, + "featured": 0, + "page": 0, + "status": "scheduled", + "language": "en_US", + "visibility": "public", + "meta_title": null, + "meta_description": null, + "author_id": 1, + "created_at": "2017-05-30T10:41:19.000Z", + "created_by": 1, + "updated_at": "2017-05-30T10:42:15.000Z", + "updated_by": 1, + "published_at": "2017-08-30T10:41:00.000Z", + "published_by": null + } + ], + "posts_tags": [ + { + "id": 3002, + "post_id": 4756, + "tag_id": 1029, + "sort_order": 0 + } + ], + "roles": [ + { + "id": 1, + "uuid": "57644e26-9a9b-46dd-8b4e-26d373699da1", + "name": "Administrator", + "description": "Administrators", + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 2, + "uuid": "faffb323-46b1-45c7-a204-b16b9cb67b4f", + "name": "Editor", + "description": "Editors", + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 3, + "uuid": "20d35c2f-29a1-4713-b885-b784c8941832", + "name": "Author", + "description": "Authors", + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + }, + { + "id": 4, + "uuid": "a064aaf1-ac17-402b-a0ce-a790836ac607", + "name": "Owner", + "description": "Blog Owner", + "created_at": "2016-10-28T13:43:34.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:34.000Z", + "updated_by": 1 + } + ], + "roles_users": [ + { + "id": 1, + "role_id": 4, + "user_id": 1 + }, + { + "id": 2, + "role_id": 3, + "user_id": 2 + }, + { + "id": 3, + "role_id": 3, + "user_id": 3 + }, + { + "id": 4, + "role_id": 3, + "user_id": 4 + }, + { + "id": 5, + "role_id": 3, + "user_id": 5 + }, + { + "id": 6, + "role_id": 3, + "user_id": 6 + }, + { + "id": 7, + "role_id": 3, + "user_id": 7 + }, + { + "id": 8, + "role_id": 3, + "user_id": 8 + }, + { + "id": 9, + "role_id": 3, + "user_id": 9 + }, + { + "id": 10, + "role_id": 3, + "user_id": 10 + }, + { + "id": 11, + "role_id": 3, + "user_id": 11 + }, + { + "id": 12, + "role_id": 3, + "user_id": 12 + }, + { + "id": 13, + "role_id": 3, + "user_id": 13 + }, + { + "id": 14, + "role_id": 3, + "user_id": 14 + }, + { + "id": 29, + "role_id": 3, + "user_id": 29 + }, + { + "id": 30, + "role_id": 3, + "user_id": 30 + }, + { + "id": 31, + "role_id": 3, + "user_id": 31 + }, + { + "id": 32, + "role_id": 3, + "user_id": 32 + }, + { + "id": 33, + "role_id": 3, + "user_id": 33 + }, + { + "id": 34, + "role_id": 3, + "user_id": 34 + }, + { + "id": 35, + "role_id": 3, + "user_id": 35 + }, + { + "id": 36, + "role_id": 1, + "user_id": 36 + }, + { + "id": 37, + "role_id": 3, + "user_id": 37 + }, + { + "id": 1082, + "role_id": 2, + "user_id": 1208 + }, + { + "id": 1083, + "role_id": 3, + "user_id": 1209 + } + ], + "settings": [ + { + "id": 1, + "uuid": "82a9a5bc-efe6-48df-bc65-86a12cc998ff", + "key": "databaseVersion", + "value": "009", + "type": "core", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:36.000Z", + "updated_by": 1 + }, + { + "id": 2, + "uuid": "ec04fd09-b3ec-4796-a808-746888b9d183", + "key": "dbHash", + "value": "0c664583-f1b5-42a3-829d-1ab234626b54", + "type": "core", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:36.000Z", + "updated_by": 1 + }, + { + "id": 3, + "uuid": "f72bcee1-75e4-475d-a5a2-91e11bb6f505", + "key": "nextUpdateCheck", + "value": null, + "type": "core", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:36.000Z", + "updated_by": 1 + }, + { + "id": 4, + "uuid": "99c53971-28cd-4609-afc6-def7cf6802f3", + "key": "displayUpdateNotification", + "value": null, + "type": "core", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:36.000Z", + "updated_by": 1 + }, + { + "id": 5, + "uuid": "39134372-0b97-4e00-aa57-2d3a4fd87229", + "key": "seenNotifications", + "value": "[]", + "type": "core", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:36.000Z", + "updated_by": 1 + }, + { + "id": 6, + "uuid": "df6fca03-3248-48c7-92ef-c1d808e6ffe3", + "key": "migrations", + "value": "{}", + "type": "core", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2016-10-28T13:43:36.000Z", + "updated_by": 1 + }, + { + "id": 7, + "uuid": "30ce73ad-a601-4ceb-9703-21af19f563bc", + "key": "title", + "value": "LTS blog", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 8, + "uuid": "c7167c6e-abfb-4977-bba4-00836a871f76", + "key": "description", + "value": "Just a blogging platform.", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 9, + "uuid": "83a78eec-1f12-4ef1-8e3e-83b95206f076", + "key": "logo", + "value": "/content/images/2017/05/bloglogo.jpeg", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 10, + "uuid": "2333af7a-ee4e-401b-9134-f3c62a770373", + "key": "cover", + "value": "/content/images/2017/05/blogcover.jpeg", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 11, + "uuid": "d7ecebc5-8513-4c04-bf45-ea8457d21c7a", + "key": "defaultLang", + "value": "en_US", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 12, + "uuid": "d0826db3-687d-4338-802f-f353de656490", + "key": "postsPerPage", + "value": "5", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 13, + "uuid": "e3628791-f446-49f6-9dc6-80b4198b2b44", + "key": "activeTimezone", + "value": "Etc/UTC", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 14, + "uuid": "d65fa4b9-b64b-43a6-b936-2c90346b4ed1", + "key": "forceI18n", + "value": "true", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 15, + "uuid": "c8a10432-9391-428f-8735-061ee3545f8b", + "key": "permalinks", + "value": "/:year/:month/:day/:slug/", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 16, + "uuid": "7f11112f-95b1-49aa-bdf6-9fb4ac65d074", + "key": "ghost_head", + "value": "", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 17, + "uuid": "cc5b524e-1186-4ff8-bd4b-fdfded4ba05b", + "key": "ghost_foot", + "value": "", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 18, + "uuid": "46ebfbf3-895e-4f7f-a98f-bb9c168bc10e", + "key": "facebook", + "value": "", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 19, + "uuid": "c9010813-f1db-4523-a6c0-282aa0d3d5f3", + "key": "twitter", + "value": "", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 20, + "uuid": "a1476e4c-f05f-48c1-80ea-35a242210db7", + "key": "labs", + "value": "{}", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 21, + "uuid": "dc6da094-2b49-4601-965f-a52bbf842b0d", + "key": "navigation", + "value": "[{\"label\":\"Home\",\"url\":\"/\"}]", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 22, + "uuid": "82669b03-9807-42a6-b6ff-08e19cab4c22", + "key": "slack", + "value": "[{\"url\":\"\"}]", + "type": "blog", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 23, + "uuid": "b94edd9a-6cbe-4498-98cc-920ba763b773", + "key": "activeApps", + "value": "[]", + "type": "app", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2016-10-28T14:15:49.000Z", + "updated_by": 1 + }, + { + "id": 24, + "uuid": "1a0f6186-b709-4c2f-a673-6f7531803af3", + "key": "installedApps", + "value": "[]", + "type": "app", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T11:36:59.000Z", + "updated_by": 1 + }, + { + "id": 25, + "uuid": "83730573-cc5a-4989-b3d3-df48aaf54396", + "key": "isPrivate", + "value": "true", + "type": "private", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 26, + "uuid": "2d364cdb-06c3-4760-bcdb-a81a6fbe6a41", + "key": "password", + "value": "privateBlogPassword", + "type": "private", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 27, + "uuid": "feceb99d-09f0-437c-ba5b-3e250d89d498", + "key": "activeTheme", + "value": "casper", + "type": "theme", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + }, + { + "id": 28, + "uuid": "bd24dc02-9705-48c2-babd-3f63a865b209", + "key": "amp", + "value": "true", + "type": "blog", + "created_at": "2017-01-15T13:49:03.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:03:55.000Z", + "updated_by": 1 + } + ], + "subscribers": [], + "tags": [ + { + "id": 1029, + "uuid": "1bbc4d06-5d6e-4960-85f7-2ca3b8f9406c", + "name": "tag1", + "slug": "tag1", + "description": null, + "image": "/content/images/2017/05/tagImage-1.jpeg", + "parent_id": null, + "visibility": "public", + "meta_title": null, + "meta_description": null, + "created_at": "2017-05-30T08:44:09.000Z", + "created_by": 36, + "updated_at": "2017-05-30T12:03:10.000Z", + "updated_by": 1 + } + ], + "users": [ + { + "id": 1, + "uuid": "1e2a7354-f580-4deb-9801-ca286628125a", + "name": "Joe Blogg's Brother", + "slug": "joe-bloggs-brother", + "password": "$2a$10$.pZeeBE0gHXd0PTnbT/ph.GEKgd0Wd3q2pWna3ynTGBkPKnGIKABC", + "email": "jbloggsbrother@example.com", + "image": "/content/images/2017/05/authorlogo.jpeg", + "cover": "/content/images/2017/05/authorcover.jpeg", + "bio": "I'm Joe's brother, the good looking one!", + "website": "http://joebloggsbrother.com", + "location": null, + "facebook": null, + "twitter": null, + "accessibility": null, + "status": "active", + "language": "en_US", + "visibility": "public", + "meta_title": null, + "meta_description": null, + "tour": null, + "last_login": "2017-05-30T10:39:32.000Z", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:02:35.000Z", + "updated_by": 1 + } + ] + } +} diff --git a/core/test/utils/fixtures/export/lts/export-lts-style-user-long-email.json b/core/test/utils/fixtures/export/lts/export-lts-style-user-long-email.json new file mode 100644 index 0000000000..85392992a4 --- /dev/null +++ b/core/test/utils/fixtures/export/lts/export-lts-style-user-long-email.json @@ -0,0 +1,37 @@ +{ + "meta": { + "exported_on": 1496145843289, + "version": "009" +}, + "data": { + "users": [ + { + "id": 1, + "uuid": "1e2a7354-f580-4deb-9801-ca286628125a", + "name": "Joe Blogg's long email Brother", + "slug": "joe-bloggs-long-email-brother", + "password": "$2a$10$.pZeeBE0gHXd0PTnbT/ph.GEKgd0Wd3q2pWna3ynTGBkPKnGIKABC", + "email": "thisisareallylongemailaddressIamhappytobeusingacharactercounterbutIhavealongwaytogoyetImeanserioulsywhohasemailaddressthislongthereisnowaythiswillpassvalidationsonghost100andisarealedgecase@example.com", + "image": "/content/images/2017/05/authorlogo.jpeg", + "cover": "/content/images/2017/05/authorcover.jpeg", + "bio": "I'm Joe's brother, the good looking one!", + "website": "http://joebloggslongemailbrother.com", + "location": null, + "facebook": null, + "twitter": null, + "accessibility": null, + "status": "active", + "language": "en_US", + "visibility": "public", + "meta_title": null, + "meta_description": null, + "tour": null, + "last_login": "2017-05-30T10:39:32.000Z", + "created_at": "2016-10-28T13:43:36.000Z", + "created_by": 1, + "updated_at": "2017-05-30T12:02:35.000Z", + "updated_by": 1 + } + ] +} +} diff --git a/core/test/utils/index.js b/core/test/utils/index.js index f235ba6fce..cdd04d723e 100644 --- a/core/test/utils/index.js +++ b/core/test/utils/index.js @@ -313,12 +313,15 @@ fixtures = { return path.resolve(__dirname + '/fixtures/import/' + filename); }, - getExportFixturePath: function (filename) { - return path.resolve(__dirname + '/fixtures/export/' + filename + '.json'); + getExportFixturePath: function (filename, options) { + options = options || {lts: false}; + var relativePath = options.lts ? '/fixtures/export/lts/' : '/fixtures/export/'; + return path.resolve(__dirname + relativePath + filename + '.json'); }, - loadExportFixture: function loadExportFixture(filename) { - var filePath = this.getExportFixturePath(filename), + loadExportFixture: function loadExportFixture(filename, options) { + options = options || {lts: false}; + var filePath = this.getExportFixturePath(filename, options), readFile = Promise.promisify(fs.readFile); return readFile(filePath).then(function (fileContents) {