From 5826f462d626c329f75ec03f648aefbb283f2f25 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Wed, 13 Jul 2022 09:12:51 +0200 Subject: [PATCH] allow manager to create/edit/delete product's category --- app/policies/product_category_policy.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/policies/product_category_policy.rb b/app/policies/product_category_policy.rb index 484d88297..5f6a0fb74 100644 --- a/app/policies/product_category_policy.rb +++ b/app/policies/product_category_policy.rb @@ -3,18 +3,18 @@ # Check the access policies for API::ProductCategoriesController class ProductCategoryPolicy < ApplicationPolicy def create? - user.admin? + user.privileged? end def update? - user.admin? + user.privileged? end def destroy? - user.admin? + user.privileged? end def position? - user.admin? + user.privileged? end end