mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-20 14:54:15 +01:00
(feat) disable create card if store hidden
This commit is contained in:
parent
5d0e170b92
commit
ef3b876bd0
@ -3,7 +3,7 @@
|
|||||||
# Check the access policies for API::CartController
|
# Check the access policies for API::CartController
|
||||||
class CartPolicy < ApplicationPolicy
|
class CartPolicy < ApplicationPolicy
|
||||||
def create?
|
def create?
|
||||||
true
|
!Setting.get('store_hidden') || user&.privileged?
|
||||||
end
|
end
|
||||||
|
|
||||||
%w[add_item remove_item set_quantity refresh_item validate].each do |action|
|
%w[add_item remove_item set_quantity refresh_item validate].each do |action|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user