From 3c66b7a2a10520b4395f515ceef56119f2043ccb Mon Sep 17 00:00:00 2001 From: Balachandra Date: Fri, 10 Dec 2021 09:07:57 +0530 Subject: [PATCH 1/4] Widget slider is showing other stores images #193 --- .../Grand.Business.Common/Services/Security/AclService.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Business/Grand.Business.Common/Services/Security/AclService.cs b/src/Business/Grand.Business.Common/Services/Security/AclService.cs index 35fcf110f..c2942f676 100644 --- a/src/Business/Grand.Business.Common/Services/Security/AclService.cs +++ b/src/Business/Grand.Business.Common/Services/Security/AclService.cs @@ -77,7 +77,9 @@ public virtual bool Authorize(T entity, string storeId) where T : BaseEntity, if (CommonHelper.IgnoreStoreLimitations) return true; - if (!entity.LimitedToStores) + //LimitedToStores flag will be false by default even after setting Limited To store value, so validate if entity consists of stores value for safer side + + if (!entity.LimitedToStores & entity.Stores.Count <= 0) return true; foreach (var storeIdWithAccess in entity.Stores) From ab6d31e906b584483cbf9c3876ab32674060a558 Mon Sep 17 00:00:00 2001 From: Sneha Mathew Date: Sat, 11 Dec 2021 08:36:02 -0500 Subject: [PATCH 2/4] Revert "Widget slider is showing other stores images #193" This reverts commit 3c66b7a2a10520b4395f515ceef56119f2043ccb. --- .../Grand.Business.Common/Services/Security/AclService.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Business/Grand.Business.Common/Services/Security/AclService.cs b/src/Business/Grand.Business.Common/Services/Security/AclService.cs index c2942f676..35fcf110f 100644 --- a/src/Business/Grand.Business.Common/Services/Security/AclService.cs +++ b/src/Business/Grand.Business.Common/Services/Security/AclService.cs @@ -77,9 +77,7 @@ public virtual bool Authorize(T entity, string storeId) where T : BaseEntity, if (CommonHelper.IgnoreStoreLimitations) return true; - //LimitedToStores flag will be false by default even after setting Limited To store value, so validate if entity consists of stores value for safer side - - if (!entity.LimitedToStores & entity.Stores.Count <= 0) + if (!entity.LimitedToStores) return true; foreach (var storeIdWithAccess in entity.Stores) From 75f1f9d31450bfb9643415003646b667b016a5db Mon Sep 17 00:00:00 2001 From: Sneha Mathew Date: Sat, 11 Dec 2021 08:37:26 -0500 Subject: [PATCH 3/4] Corrected null check --- .../Grand.Business.Common/Extensions/TranslateExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Business/Grand.Business.Common/Extensions/TranslateExtensions.cs b/src/Business/Grand.Business.Common/Extensions/TranslateExtensions.cs index 343dd9890..f69194b66 100644 --- a/src/Business/Grand.Business.Common/Extensions/TranslateExtensions.cs +++ b/src/Business/Grand.Business.Common/Extensions/TranslateExtensions.cs @@ -273,7 +273,7 @@ public static async Task AddOrUpdatePluginTranslateResource(this BasePlugin plug throw new ArgumentNullException(nameof(translationService)); if (languageService == null) throw new ArgumentNullException(nameof(languageService)); - if (string.IsNullOrEmpty(name)) + if (!string.IsNullOrEmpty(name)) name = name.ToLowerInvariant(); foreach (var lang in await languageService.GetAllLanguages(true)) { From 93a9c9942577c0d61a5551942fd33a3b5488bbc1 Mon Sep 17 00:00:00 2001 From: Pattipati Jithendra Prasad Date: Sat, 1 Jan 2022 22:06:20 +0530 Subject: [PATCH 4/4] https://github.com/grandnode/grandnode2/issues/200 Fix for the above issue --- .../Views/Product/ProductSpecAttrPopup.cshtml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Product/ProductSpecAttrPopup.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Product/ProductSpecAttrPopup.cshtml index 251dc5b69..fc103a073 100644 --- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Product/ProductSpecAttrPopup.cshtml +++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Product/ProductSpecAttrPopup.cshtml @@ -2,8 +2,8 @@ @{ Layout = ""; } -
@@ -61,7 +61,11 @@
-
+
+ + +
+
@@ -174,23 +178,31 @@ $('#pnlCustomValue').hide(); $('#pnlCustomName').hide(); $('#disableOnCustom').show(); + $('#pnlCustomValueText').hide(); + $('#pnlCustomHTMLText').hide(); $('#pnlAllowFiltering').show(); } else if (selectedTypeId == @(((int)SpecificationAttributeType.CustomText).ToString())) { $('#pnlSpecificationAttributeOptionId').hide(); $('#pnlCustomName').show(); $('#pnlCustomValue').show(); + $('#pnlCustomValueText').show(); + $('#pnlCustomHTMLText').hide(); $('#disableOnCustom').hide(); $('#pnlAllowFiltering').hide(); } else if (selectedTypeId == @(((int)SpecificationAttributeType.CustomHtmlText).ToString())) { $('#pnlSpecificationAttributeOptionId').hide(); $('#pnlCustomName').show(); $('#pnlCustomValue').show(); + $('#pnlCustomValueText').hide(); + $('#pnlCustomHTMLText').show(); $('#disableOnCustom').hide(); $('#pnlAllowFiltering').hide(); } else if (selectedTypeId == @(((int)SpecificationAttributeType.Hyperlink).ToString())) { $('#pnlSpecificationAttributeOptionId').hide(); $('#pnlCustomName').show(); $('#pnlCustomValue').show(); + $('#pnlCustomValueText').hide(); + $('#pnlCustomHTMLText').hide(); $('#disableOnCustom').hide(); $('#pnlAllowFiltering').hide(); }