diff --git a/app/policies/statistic_policy.rb b/app/policies/statistic_policy.rb index d598bd792..30ee6fc22 100644 --- a/app/policies/statistic_policy.rb +++ b/app/policies/statistic_policy.rb @@ -1,6 +1,6 @@ class StatisticPolicy < ApplicationPolicy %w(index account event machine project subscription training user space scroll export_subscription export_machine - export_training export_event export_account export_project export_global).each do |action| + export_training export_event export_account export_project export_space export_global).each do |action| define_method "#{action}?" do user.is_admin? end diff --git a/app/services/statistics_export_service.rb b/app/services/statistics_export_service.rb index a1c73ad68..58996a92e 100644 --- a/app/services/statistics_export_service.rb +++ b/app/services/statistics_export_service.rb @@ -40,7 +40,7 @@ class StatisticsExportService File.open(export.file,"w+b") {|f| f.puts content } end - %w(account event machine project subscription training).each do |path| + %w(account event machine project subscription training space).each do |path| class_eval %{ def export_#{path}(export) diff --git a/app/workers/statistics_export_worker.rb b/app/workers/statistics_export_worker.rb index 0f5e97e3f..7c0c0d23e 100644 --- a/app/workers/statistics_export_worker.rb +++ b/app/workers/statistics_export_worker.rb @@ -15,7 +15,7 @@ class StatisticsExportWorker service = StatisticsExportService.new method_name = "export_#{export.export_type}" - if %w(account event machine project subscription training global).include?(export.export_type) and service.respond_to?(method_name) + if %w(account event machine project subscription training space global).include?(export.export_type) and service.respond_to?(method_name) service.public_send(method_name, export) NotificationCenter.call type: :notify_admin_export_complete, diff --git a/config/locales/en.yml b/config/locales/en.yml index 3683f979d..575fec07d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -275,6 +275,7 @@ en: statistics_project: "of statistics about projects" statistics_subscription: "of subscription statistics" statistics_training: "of statistics about trainings" + statistics_space: "of statistics about spaces" users_members: "of the members' list" users_subscriptions: "of the subscriptions' list" users_reservations: "of the reservations' list" diff --git a/config/locales/fr.yml b/config/locales/fr.yml index f072a68f2..2765f632b 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -275,6 +275,7 @@ fr: statistics_project: "des statistiques sur les projets" statistics_subscription: "des statistiques d'abonnements" statistics_training: "des statistiques sur les formations" + statistics_space: "des statistiques sur les espaces" users_members: "de la liste des membres" users_subscriptions: "de la liste des abonnements" users_reservations: "de la liste des réservations" diff --git a/config/locales/mails.en.yml b/config/locales/mails.en.yml index 5aac5158e..3bb43902e 100644 --- a/config/locales/mails.en.yml +++ b/config/locales/mails.en.yml @@ -268,6 +268,7 @@ en: statistics_project: "of statistics about projects" statistics_subscription: "of subscription statistics" statistics_training: "of statistics about trainings" + statistics_space: "of statistics about spaces" users_members: "of the members' list" users_subscriptions: "of the subscriptions' list" users_reservations: "of the reservations' list" diff --git a/config/locales/mails.fr.yml b/config/locales/mails.fr.yml index 0469bd941..881e989a3 100644 --- a/config/locales/mails.fr.yml +++ b/config/locales/mails.fr.yml @@ -268,6 +268,7 @@ fr: statistics_project: "des statistiques sur les projets" statistics_subscription: "des statistiques d'abonnements" statistics_training: "des statistiques sur les formations" + statistics_space: "des statistiques sur les espaces" users_members: "de la liste des membres" users_subscriptions: "de la liste des abonnements" users_reservations: "de la liste des réservations"