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:
parent
5d0e170b92
commit
ef3b876bd0
@ -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|
|
||||
|
Loading…
x
Reference in New Issue
Block a user