-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
no refs [Portal](https://github.com/TryGhost/Portal) is a new drop-in script to make the bulk of Ghost membership features work on any theme out of the box, which was under a developer flag so far. This release removes the flag for Portal and makes it included as default for any members-enabled Ghost site. The Portal script is backward compatible with old public members script and existing Members-enabled themes should notice no change. - Removes Portal config flag as Portal is now enabled by default - Removes old members script as Portal is backward compatible with it - Changes `{{content}}` helper to show default CTA in case of restricted content access - `accent_color` setting is no more behind the dev experiment flag and included by default - Adds migration to switch off Portal button setting for all existing sites which don't have Portal enabled in beta
- Loading branch information
1 parent
4ebebd1
commit 8ad11fe
Showing
16 changed files
with
43 additions
and
384 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
core/server/data/migrations/versions/3.37/01-update-portal-button-setting.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const logging = require('../../../../../shared/logging'); | ||
const config = require('../../../../../shared/config'); | ||
|
||
module.exports = { | ||
config: { | ||
transaction: true | ||
}, | ||
|
||
async up(options) { | ||
// update portal button setting to false | ||
const isPortalEnabled = config.get('portal'); | ||
if (!isPortalEnabled) { | ||
logging.info(`Updating portal button setting to false`); | ||
return await options | ||
.transacting('settings') | ||
.where('key', 'portal_button') | ||
.update({ | ||
value: 'false' | ||
}); | ||
} | ||
logging.info(`Portal is enabled, ignoring portal button update`); | ||
return Promise.resolve(); | ||
}, | ||
|
||
// `up` is only run to fix previously set default value for portal button, | ||
// it doesn't make sense to be revert it back as `true` as feature is still behind dev flag | ||
async down() { | ||
return Promise.resolve(); | ||
} | ||
}; |
Oops, something went wrong.