diff --git a/config/dev.js b/config/dev.js index 8383516b905452be64f57f3a2329715b0960598f..6fa983e0eb913974673d4d301709585840bdb3b5 100644 --- a/config/dev.js +++ b/config/dev.js @@ -1,6 +1,6 @@ - const path = require('path') -const editoriaMode = require('../app/authsome_editoria') + +const universal = require('./universal') module.exports = { 'pubsweet-backend': { @@ -9,26 +9,13 @@ module.exports = { API_ENDPOINT: '/api' }, 'pubsweet-frontend': { - theme: 'ThemeEditoria', + theme: universal.theme, routes: 'app/routes.jsx', navigation: 'app/components/Navigation/Navigation.jsx' }, authsome: { - mode: editoriaMode, - teams: { - teamProduction: { - name: 'Production Editor', - permissions: 'all' - }, - teamCopyEditor: { - name: 'Copy Editor', - permissions: 'update' - }, - teamauthors: { - name: 'Author', - permissions: 'update' - } - } + mode: universal.mode, + teams: universal.teams }, pubsweet: { components: ['pubsweet-component-signup', 'pubsweet-component-login'] diff --git a/config/production.js b/config/production.js index 31f7de51fad5a9ba6b338bf979ab658d83d9d092..da468a6a91cfc2927b020cc7d23393a4f5a46a0f 100644 --- a/config/production.js +++ b/config/production.js @@ -1,6 +1,6 @@ - const path = require('path') -const blogmode = require('authsome/src/modes/blog') + +const universal = require('./universal') module.exports = { 'pubsweet-backend': { @@ -9,22 +9,13 @@ module.exports = { API_ENDPOINT: '/api' }, 'pubsweet-frontend': { - theme: 'PepperTheme', + theme: universal.theme, routes: 'app/routes.jsx', navigation: 'app/components/Navigation/Navigation.jsx' }, authsome: { - mode: blogmode, - teams: { - teamContributors: { - name: 'Contributors', - permissions: 'create' - }, - teamCoauthors: { - name: 'Coauthors', - permissions: 'update' - } - } + mode: universal.mode, + teams: universal.teams }, pubsweet: { components: ['pubsweet-component-signup', 'pubsweet-component-login'] diff --git a/config/universal.js b/config/universal.js new file mode 100644 index 0000000000000000000000000000000000000000..3575878a5305114a30ccb0cdfd5714847d09b7b7 --- /dev/null +++ b/config/universal.js @@ -0,0 +1,20 @@ +const editoriaMode = require('../app/authsome_editoria') + +module.exports = { + mode: editoriaMode, + teams: { + teamProduction: { + name: 'Production Editor', + permissions: 'all' + }, + teamCopyEditor: { + name: 'Copy Editor', + permissions: 'update' + }, + teamauthors: { + name: 'Author', + permissions: 'update' + } + }, + theme: 'ThemeEditoria' +}