2015-05-05 03:10:25 +02:00
|
|
|
class ExportPolicy < Struct.new(:user, :export)
|
2016-03-23 18:39:41 +01:00
|
|
|
%w(export_reservations export_members export_subscriptions).each do |action|
|
2015-05-05 03:10:25 +02:00
|
|
|
define_method "#{action}?" do
|
|
|
|
user.is_admin?
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|