Skip to content

Commit

Permalink
Typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
support committed Nov 8, 2023
1 parent 12e8210 commit eef0dc8
Show file tree
Hide file tree
Showing 36 changed files with 95 additions and 68 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@model CustomerModel
@inject AdminAreaSettings adminAreaSettings
@inject Grand.Business.Core.Interfaces.Common.Security.IPermissionService permisionService
@inject Grand.Business.Core.Interfaces.Common.Security.IPermissionService permissionService
@{
var defaultGridPageSize = adminAreaSettings.DefaultGridPageSize;
var gridPageSizes = adminAreaSettings.GridPageSizes;
Expand Down Expand Up @@ -157,7 +157,7 @@
</script>
}

@if (await permisionService.Authorize(Grand.Business.Core.Utilities.Common.Security.PermissionSystemName.MessageQueue) && !string.IsNullOrEmpty(Model.Email))
@if (await permissionService.Authorize(Grand.Business.Core.Utilities.Common.Security.PermissionSystemName.MessageQueue) && !string.IsNullOrEmpty(Model.Email))
{
<br />
<strong>@Loc["Admin.System.QueuedEmails"]</strong>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@model OrderModel
@inject Grand.Business.Core.Interfaces.Common.Security.IPermissionService permisionService;
@inject Grand.Business.Core.Interfaces.Common.Security.IPermissionService permissionService;
<vc:admin-widget widget-zone="order_details_address_top" additional-data="Model" />
@if (Model.IsShippable)
{
@if (await permisionService.Authorize(Grand.Business.Core.Utilities.Common.Security.PermissionSystemName.Shipments))
@if (await permissionService.Authorize(Grand.Business.Core.Utilities.Common.Security.PermissionSystemName.Shipments))
{
<div class="card col-md-12">
<div class="card-body">
Expand Down
4 changes: 2 additions & 2 deletions src/Web/Grand.Web.Admin/Controllers/BlogController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public async Task<IActionResult> Edit(string id)
if (await _groupService.IsStaff(_workContext.CurrentCustomer))
{
if (!blogPost.LimitedToStores || (blogPost.LimitedToStores && blogPost.Stores.Contains(_workContext.CurrentCustomer.StaffStoreId) && blogPost.Stores.Count > 1))
Warning(_translationService.GetResource("Admin.Content.Blog.BlogPosts.Permisions"));
Warning(_translationService.GetResource("Admin.Content.Blog.BlogPosts.Permissions"));
else
{
if (!blogPost.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
Expand Down Expand Up @@ -340,7 +340,7 @@ public async Task<IActionResult> CategoryEdit(string id)
if (await _groupService.IsStaff(_workContext.CurrentCustomer))
{
if (!blogCategory.LimitedToStores || (blogCategory.LimitedToStores && blogCategory.Stores.Contains(_workContext.CurrentCustomer.StaffStoreId) && blogCategory.Stores.Count > 1))
Warning(_translationService.GetResource("Admin.Content.Blog.BlogCategory.Permisions"));
Warning(_translationService.GetResource("Admin.Content.Blog.BlogCategory.Permissions"));
else
{
if (!blogCategory.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
Expand Down
2 changes: 1 addition & 1 deletion src/Web/Grand.Web.Admin/Controllers/BrandController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public async Task<IActionResult> Edit(string id)
if (await _groupService.IsStaff(_workContext.CurrentCustomer))
{
if (!brand.LimitedToStores || (brand.LimitedToStores && brand.Stores.Contains(_workContext.CurrentCustomer.StaffStoreId) && brand.Stores.Count > 1))
Warning(_translationService.GetResource("Admin.Catalog.Brands.Permisions"));
Warning(_translationService.GetResource("Admin.Catalog.Brands.Permissions"));
else
{
if (!brand.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
Expand Down
2 changes: 1 addition & 1 deletion src/Web/Grand.Web.Admin/Controllers/CategoryController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public async Task<IActionResult> Edit(string id)
if (await _groupService.IsStaff(_workContext.CurrentCustomer))
{
if (!category.LimitedToStores || (category.LimitedToStores && category.Stores.Contains(_workContext.CurrentCustomer.StaffStoreId) && category.Stores.Count > 1))
Warning(_translationService.GetResource("Admin.Catalog.Categories.Permisions"));
Warning(_translationService.GetResource("Admin.Catalog.Categories.Permissions"));
else
{
if (!category.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public async Task<IActionResult> Edit(string id)
if (await _groupService.IsStaff(_workContext.CurrentCustomer))
{
if (!collection.LimitedToStores || (collection.LimitedToStores && collection.Stores.Contains(_workContext.CurrentCustomer.StaffStoreId) && collection.Stores.Count > 1))
Warning(_translationService.GetResource("Admin.Catalog.Collections.Permisions"));
Warning(_translationService.GetResource("Admin.Catalog.Collections.Permissions"));
else
{
if (!collection.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
Expand Down
8 changes: 4 additions & 4 deletions src/Web/Grand.Web.Admin/Controllers/CourseController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public async Task<IActionResult> Edit(string id)
if (await _groupService.IsStaff(_workContext.CurrentCustomer))
{
if (!course.LimitedToStores || (course.LimitedToStores && course.Stores.Contains(_workContext.CurrentCustomer.StaffStoreId) && course.Stores.Count > 1))
Warning(_translationService.GetResource("Admin.Courses.Course.Permisions"));
Warning(_translationService.GetResource("Admin.Courses.Course.Permissions"));
else
{
if (!course.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
Expand Down Expand Up @@ -406,7 +406,7 @@ public async Task<IActionResult> CreateLesson(string courseId)
if (await _groupService.IsStaff(_workContext.CurrentCustomer))
{
if (!course.LimitedToStores || (course.LimitedToStores && course.Stores.Contains(_workContext.CurrentCustomer.StaffStoreId) && course.Stores.Count > 1))
Warning(_translationService.GetResource("Admin.Courses.Course.Permisions"));
Warning(_translationService.GetResource("Admin.Courses.Course.Permissions"));
else
{
if (!course.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
Expand All @@ -431,7 +431,7 @@ public async Task<IActionResult> CreateLesson(CourseLessonModel model, bool cont
if (await _groupService.IsStaff(_workContext.CurrentCustomer))
{
if (!course.LimitedToStores || (course.LimitedToStores && course.Stores.Contains(_workContext.CurrentCustomer.StaffStoreId) && course.Stores.Count > 1))
Warning(_translationService.GetResource("Admin.Courses.Course.Permisions"));
Warning(_translationService.GetResource("Admin.Courses.Course.Permissions"));
else
{
if (!course.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
Expand Down Expand Up @@ -469,7 +469,7 @@ public async Task<IActionResult> EditLesson(string id)
if (await _groupService.IsStaff(_workContext.CurrentCustomer))
{
if (!course.LimitedToStores || (course.LimitedToStores && course.Stores.Contains(_workContext.CurrentCustomer.StaffStoreId) && course.Stores.Count > 1))
Warning(_translationService.GetResource("Admin.Courses.Course.Permisions"));
Warning(_translationService.GetResource("Admin.Courses.Course.Permissions"));
else
{
if (!course.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
Expand Down
2 changes: 1 addition & 1 deletion src/Web/Grand.Web.Admin/Controllers/DiscountController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public async Task<IActionResult> Edit(string id)
if (await _groupService.IsStaff(_workContext.CurrentCustomer))
{
if (!discount.LimitedToStores || (discount.LimitedToStores && discount.Stores.Contains(_workContext.CurrentCustomer.StaffStoreId) && discount.Stores.Count > 1))
Warning(_translationService.GetResource("admin.marketing.discounts.Permisions"));
Warning(_translationService.GetResource("admin.marketing.discounts.Permissions"));
else
{
if (!discount.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
Expand Down
34 changes: 17 additions & 17 deletions src/Web/Grand.Web.Admin/Controllers/ProductController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public async Task<IActionResult> Edit(string id)
if (await _groupService.IsStaff(_workContext.CurrentCustomer))
{
if (!product.LimitedToStores || (product.LimitedToStores && product.Stores.Contains(_workContext.CurrentCustomer.StaffStoreId) && product.Stores.Count > 1))
Warning(_translationService.GetResource("Admin.Catalog.Products.Permisions"));
Warning(_translationService.GetResource("Admin.Catalog.Products.Permissions"));
else
{
if (!product.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
Expand Down Expand Up @@ -1899,7 +1899,7 @@ public async Task<IActionResult> ProductAttributeMappingDelete(string id, string

if (await _groupService.IsStaff(_workContext.CurrentCustomer))
if (!product.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
return ErrorForKendoGridJson(_translationService.GetResource("Admin.Catalog.Products.Permisions"));
return ErrorForKendoGridJson(_translationService.GetResource("Admin.Catalog.Products.Permissions"));

await productAttributeService.DeleteProductAttributeMapping(productAttributeMapping, product.Id);
return new JsonResult("");
Expand Down Expand Up @@ -1982,7 +1982,7 @@ public async Task<IActionResult> ProductAttributeConditionPopup(ProductAttribute

if (await _groupService.IsStaff(_workContext.CurrentCustomer))
if (!product.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
return Content(_translationService.GetResource("Admin.Catalog.Products.Permisions"));
return Content(_translationService.GetResource("Admin.Catalog.Products.Permissions"));

await _productViewModelService.UpdateProductAttributeConditionModel(product, productAttributeMapping, model);
return Content("");
Expand Down Expand Up @@ -2154,7 +2154,7 @@ public async Task<IActionResult> ProductAttributeValueDelete(string id, string p

if (await _groupService.IsStaff(_workContext.CurrentCustomer))
if (!product.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
throw new ArgumentException(_translationService.GetResource("Admin.Catalog.Products.Permisions"));
throw new ArgumentException(_translationService.GetResource("Admin.Catalog.Products.Permissions"));

if (ModelState.IsValid)
{
Expand Down Expand Up @@ -2230,7 +2230,7 @@ public async Task<IActionResult> ProductAttributeCombinationDelete(string id, st

if (await _groupService.IsStaff(_workContext.CurrentCustomer))
if (!product.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
return Content(_translationService.GetResource("Admin.Catalog.Products.Permisions"));
return Content(_translationService.GetResource("Admin.Catalog.Products.Permissions"));

await productAttributeService.DeleteProductAttributeCombination(combination, productId);
if (product.ManageInventoryMethodId == ManageInventoryMethod.ManageStockByAttributes)
Expand Down Expand Up @@ -2271,7 +2271,7 @@ public async Task<IActionResult> AttributeCombinationPopup(string productId,

if (await _groupService.IsStaff(_workContext.CurrentCustomer))
if (!product.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
return Content(_translationService.GetResource("Admin.Catalog.Products.Permisions"));
return Content(_translationService.GetResource("Admin.Catalog.Products.Permissions"));

var warnings = await _productViewModelService.InsertOrUpdateProductAttributeCombinationPopup(product, model);
if (!warnings.Any())
Expand All @@ -2294,7 +2294,7 @@ public async Task<IActionResult> GenerateAllAttributeCombinations(string product

if (await _groupService.IsStaff(_workContext.CurrentCustomer))
if (!product.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
return Content(_translationService.GetResource("Admin.Catalog.Products.Permisions"));
return Content(_translationService.GetResource("Admin.Catalog.Products.Permissions"));

await _productViewModelService.GenerateAllAttributeCombinations(product);

Expand All @@ -2311,7 +2311,7 @@ public async Task<IActionResult> ClearAllAttributeCombinations(string productId,

if (await _groupService.IsStaff(_workContext.CurrentCustomer))
if (!product.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
throw new ArgumentException(_translationService.GetResource("Admin.Catalog.Products.Permisions"));
throw new ArgumentException(_translationService.GetResource("Admin.Catalog.Products.Permissions"));

if (ModelState.IsValid)
{
Expand Down Expand Up @@ -2359,7 +2359,7 @@ public async Task<IActionResult> ProductAttributeCombinationTierPriceInsert(stri

if (await _groupService.IsStaff(_workContext.CurrentCustomer))
if (!product.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
return Content("", _translationService.GetResource("Admin.Catalog.Products.Permisions"));
return Content("", _translationService.GetResource("Admin.Catalog.Products.Permissions"));

var combination = product.ProductAttributeCombinations.FirstOrDefault(x => x.Id == productAttributeCombinationId);
if (combination != null)
Expand All @@ -2378,7 +2378,7 @@ public async Task<IActionResult> ProductAttributeCombinationTierPriceUpdate(stri

if (await _groupService.IsStaff(_workContext.CurrentCustomer))
if (!product.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
return Content("", _translationService.GetResource("Admin.Catalog.Products.Permisions"));
return Content("", _translationService.GetResource("Admin.Catalog.Products.Permissions"));

var combination = product.ProductAttributeCombinations.FirstOrDefault(x => x.Id == productAttributeCombinationId);
if (combination != null)
Expand All @@ -2397,7 +2397,7 @@ public async Task<IActionResult> ProductAttributeCombinationTierPriceDelete(stri

if (await _groupService.IsStaff(_workContext.CurrentCustomer))
if (!product.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
return ErrorForKendoGridJson(_translationService.GetResource("Admin.Catalog.Products.Permisions"));
return ErrorForKendoGridJson(_translationService.GetResource("Admin.Catalog.Products.Permissions"));

var combination = product.ProductAttributeCombinations.FirstOrDefault(x => x.Id == productAttributeCombinationId);
if (combination != null)
Expand Down Expand Up @@ -2478,7 +2478,7 @@ public async Task<IActionResult> GenerateCalendar(string productId, ProductModel

if (await _groupService.IsStaff(_workContext.CurrentCustomer))
if (!product.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
return Json(new { errors = _translationService.GetResource("Admin.Catalog.Products.Permisions") });
return Json(new { errors = _translationService.GetResource("Admin.Catalog.Products.Permissions") });

var reservations = await _productReservationService.GetProductReservationsByProductId(productId, null, null);
if (reservations.Any())
Expand Down Expand Up @@ -2623,7 +2623,7 @@ public async Task<IActionResult> ClearCalendar(string productId)

if (await _groupService.IsStaff(_workContext.CurrentCustomer))
if (!product.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
return Json(new { errors = _translationService.GetResource("Admin.Catalog.Products.Permisions") });
return Json(new { errors = _translationService.GetResource("Admin.Catalog.Products.Permissions") });

var toDelete = await _productReservationService.GetProductReservationsByProductId(productId, true, null);
foreach (var record in toDelete)
Expand All @@ -2643,7 +2643,7 @@ public async Task<IActionResult> ClearOld(string productId)

if (await _groupService.IsStaff(_workContext.CurrentCustomer))
if (!product.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
return Json(new { errors = _translationService.GetResource("Admin.Catalog.Products.Permisions") });
return Json(new { errors = _translationService.GetResource("Admin.Catalog.Products.Permissions") });

var toDelete = (await _productReservationService.GetProductReservationsByProductId(productId, true, null)).Where(x => x.Date < DateTime.UtcNow);
foreach (var record in toDelete)
Expand All @@ -2664,7 +2664,7 @@ public async Task<IActionResult> ProductReservationDelete(ProductModel.Reservati

if (await _groupService.IsStaff(_workContext.CurrentCustomer))
if (!product.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
return ErrorForKendoGridJson(_translationService.GetResource("Admin.Catalog.Products.Permisions"));
return ErrorForKendoGridJson(_translationService.GetResource("Admin.Catalog.Products.Permissions"));

var toDelete = await _productReservationService.GetProductReservation(model.ReservationId);
if (toDelete != null)
Expand Down Expand Up @@ -2692,7 +2692,7 @@ public async Task<IActionResult> ListBids(DataSourceRequest command, string prod

if (await _groupService.IsStaff(_workContext.CurrentCustomer))
if (!product.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
return Json(new { errors = _translationService.GetResource("Admin.Catalog.Products.Permisions") });
return Json(new { errors = _translationService.GetResource("Admin.Catalog.Products.Permissions") });

var (bidModels, totalCount) = await _productViewModelService.PrepareBidMode(productId, command.Page, command.PageSize);
var gridModel = new DataSourceResult {
Expand All @@ -2712,7 +2712,7 @@ public async Task<IActionResult> BidDelete(ProductModel.BidModel model, [FromSer

if (await _groupService.IsStaff(_workContext.CurrentCustomer))
if (!product.AccessToEntityByStore(_workContext.CurrentCustomer.StaffStoreId))
return Json(new DataSourceResult { Errors = _translationService.GetResource("Admin.Catalog.Products.Permisions") });
return Json(new DataSourceResult { Errors = _translationService.GetResource("Admin.Catalog.Products.Permissions") });

var toDelete = await _auctionService.GetBid(model.BidId);
if (toDelete != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public AddAssociatedProductModelValidator(
return false;

return true;
}).WithMessage(translationService.GetResource("Admin.Catalog.Products.Permisions"));
}).WithMessage(translationService.GetResource("Admin.Catalog.Products.Permissions"));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public AddBundleProductModelValidator(
return false;

return true;
}).WithMessage(translationService.GetResource("Admin.Catalog.Products.Permisions"));
}).WithMessage(translationService.GetResource("Admin.Catalog.Products.Permissions"));
}
}
}
Expand Down
Loading

0 comments on commit eef0dc8

Please sign in to comment.