2015-05-05 03:10:25 +02:00
|
|
|
class ExportPolicy < Struct.new(:user, :export)
|
2016-07-27 15:42:29 +02:00
|
|
|
%w(export_reservations export_members export_subscriptions download status).each do |action|
|
2015-05-05 03:10:25 +02:00
|
|
|
define_method "#{action}?" do
|
|
|
|
user.is_admin?
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|