mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Updated validation for post/page
refs https://github.com/TryGhost/Team/issues/1071 - ignores `tiers` as its a valid visibility filter
This commit is contained in:
parent
bc5c00ba05
commit
d461525978
2 changed files with 2 additions and 2 deletions
|
@ -16,7 +16,7 @@ const validateVisibility = async function (frame) {
|
|||
const visibility = frame.data.pages[0].visibility;
|
||||
const visibilityFilter = frame.data.pages[0].visibility_filter;
|
||||
if (visibility) {
|
||||
if (!['public', 'members', 'paid'].includes(visibility)) {
|
||||
if (!['public', 'members', 'paid', 'tiers'].includes(visibility)) {
|
||||
// check filter is valid
|
||||
try {
|
||||
await models.Member.findPage({filter: visibilityFilter, limit: 1});
|
||||
|
|
|
@ -16,7 +16,7 @@ const validateVisibility = async function (frame) {
|
|||
const visibility = frame.data.posts[0].visibility;
|
||||
const visibilityFilter = frame.data.posts[0].visibility_filter;
|
||||
if (visibility) {
|
||||
if (!['public', 'members', 'paid'].includes(visibility)) {
|
||||
if (!['public', 'members', 'paid', 'tiers'].includes(visibility)) {
|
||||
// check filter is valid
|
||||
try {
|
||||
await models.Member.findPage({filter: visibilityFilter, limit: 1});
|
||||
|
|
Loading…
Add table
Reference in a new issue