mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-18 12:54:27 +01:00
allow manager to create/edit/delete product's category
This commit is contained in:
parent
778f98bd9a
commit
5826f462d6
@ -3,18 +3,18 @@
|
|||||||
# Check the access policies for API::ProductCategoriesController
|
# Check the access policies for API::ProductCategoriesController
|
||||||
class ProductCategoryPolicy < ApplicationPolicy
|
class ProductCategoryPolicy < ApplicationPolicy
|
||||||
def create?
|
def create?
|
||||||
user.admin?
|
user.privileged?
|
||||||
end
|
end
|
||||||
|
|
||||||
def update?
|
def update?
|
||||||
user.admin?
|
user.privileged?
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy?
|
def destroy?
|
||||||
user.admin?
|
user.privileged?
|
||||||
end
|
end
|
||||||
|
|
||||||
def position?
|
def position?
|
||||||
user.admin?
|
user.privileged?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user