1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/app/policies/coupon_policy.rb

11 lines
259 B
Ruby
Raw Normal View History

2019-09-25 16:37:42 +02:00
# frozen_string_literal: true
# Check the access policies for API::CouponsController
2016-08-03 17:56:36 +02:00
class CouponPolicy < ApplicationPolicy
2019-09-25 16:37:42 +02:00
%w[index show create update destroy send_to].each do |action|
2016-08-03 17:56:36 +02:00
define_method "#{action}?" do
user.admin?
2016-08-03 17:56:36 +02:00
end
end
end