Browse Source

fix(core): Add Permission.ReadProduct to Allow decorator of TaxCategoryResolver.taxCategories (#1275)

Vinicius Rosa 4 years ago
parent
commit
ff24fc0eba
1 changed files with 7 additions and 2 deletions
  1. 7 2
      packages/core/src/api/resolvers/admin/tax-category.resolver.ts

+ 7 - 2
packages/core/src/api/resolvers/admin/tax-category.resolver.ts

@@ -20,8 +20,13 @@ export class TaxCategoryResolver {
     constructor(private taxCategoryService: TaxCategoryService) {}
     constructor(private taxCategoryService: TaxCategoryService) {}
 
 
     @Query()
     @Query()
-    @Allow(Permission.ReadSettings, Permission.ReadCatalog, Permission.ReadTaxCategory)
-    taxCategories(@Ctx() ctx: RequestContext): Promise<TaxCategory[]> {
+    @Allow(
+        Permission.ReadSettings,
+        Permission.ReadCatalog,
+        Permission.ReadProduct,
+        Permission.ReadTaxCategory,
+    )
+    async taxCategories(@Ctx() ctx: RequestContext): Promise<TaxCategory[]> {
         return this.taxCategoryService.findAll(ctx);
         return this.taxCategoryService.findAll(ctx);
     }
     }