diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 474cc86..92f648e 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -5,7 +5,7 @@ class ApplicationController < ActionController::Base helper_method :current_user helper_method :current_locale helper_method :installing_gem?, :installing_gems, :uninstalling_gem?, :uninstalling_gems - helper_method :fluentd_ui_title, :fluentd_ui_brand + helper_method :fluentd_ui_title, :fluentd_ui_brand, :fluentd_run_user helper_method :file_tail helper_method :fluentd_exists? before_action :login_required @@ -38,6 +38,10 @@ class ApplicationController < ActionController::Base ENV["FLUENTD_UI_BRAND"] || "fluentd" end + def fluentd_run_user + Fluentd.instance.td_agent? ? "td-agent" : ENV["USER"] + end + def installing_gem? installing_gems.present? end diff --git a/app/views/fluentd/settings/in_tail/show.html.haml b/app/views/fluentd/settings/in_tail/show.html.haml index 2b399a2..da3c986 100644 --- a/app/views/fluentd/settings/in_tail/show.html.haml +++ b/app/views/fluentd/settings/in_tail/show.html.haml @@ -2,3 +2,4 @@ = render partial: "shared/vue/treeview", locals: {name: "path", action: after_file_choose_daemon_setting_in_tail_path(@fluentd), submit_button: t('terms.next')} +%p.text.text-danger= t('fluentd.settings.in_tail.notice_for_permission', user: fluentd_run_user) diff --git a/config/locales/translation_en.yml b/config/locales/translation_en.yml index e584eff..ca31ca8 100644 --- a/config/locales/translation_en.yml +++ b/config/locales/translation_en.yml @@ -154,6 +154,7 @@ en: in_tail_option_guide: | For each config parameter, pelase refer to the Tail iutput plugin documentation page. in_tail: + notice_for_permission: "Please check permission or group setting for %{user} user can read it." restart_from_first: Restart from first grok_manual: |
diff --git a/config/locales/translation_ja.yml b/config/locales/translation_ja.yml index e5260e9..7aac88f 100644 --- a/config/locales/translation_ja.yml +++ b/config/locales/translation_ja.yml @@ -155,6 +155,7 @@ ja: in_tailプラグインの解説ページや Fluentularもご参照ください。 in_tail: + notice_for_permission: "※%{user}ユーザーが読み込み可能なようにパーミッションやグループの設定をご確認ください。" restart_from_first: 最初からやり直す grok_manual: |