1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-17 11:54:22 +01:00

(feat) disable create card if store hidden

This commit is contained in:
Du Peng 2022-10-13 17:56:34 +02:00
parent 5d0e170b92
commit ef3b876bd0

View File

@ -3,7 +3,7 @@
# Check the access policies for API::CartController
class CartPolicy < ApplicationPolicy
def create?
true
!Setting.get('store_hidden') || user&.privileged?
end
%w[add_item remove_item set_quantity refresh_item validate].each do |action|