mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
Removed usage of portal products setting
refs https://github.com/TryGhost/Team/issues/1387 Tier visibility is now managed by `visibility` property, and we'll be removing the `portal_products` setting in future.
This commit is contained in:
parent
45a6286a64
commit
12944a4c91
@ -285,15 +285,10 @@ export default ModalComponent.extend({
|
||||
},
|
||||
|
||||
updateAllowedProduct(productId, isChecked) {
|
||||
const portalProductsSetting = this.settings.get('portalProducts') || [];
|
||||
const allowedProducts = [...portalProductsSetting];
|
||||
|
||||
const product = this.model.products.find(p => p.id === productId);
|
||||
if (!isChecked) {
|
||||
this.settings.set('portalProducts', allowedProducts.filter(p => p !== productId));
|
||||
product.set('visibility', 'none');
|
||||
} else {
|
||||
this.settings.set('portalProducts', allowedProducts);
|
||||
product.set('visibility', 'public');
|
||||
}
|
||||
let portalProducts = this.model.products.filter((p) => {
|
||||
|
Loading…
Reference in New Issue
Block a user