Feature #29664 » Allow-administrators-to-disable-webhooks-from-settings.patch
| app/controllers/webhooks_controller.rb | ||
|---|---|---|
|
self.main_menu = false
|
||
|
before_action :require_login
|
||
|
before_action :check_enabled
|
||
|
before_action :authorize
|
||
|
before_action :find_webhook, only: [:edit, :update, :destroy]
|
||
| ... | ... | |
|
def authorize
|
||
|
deny_access unless User.current.allowed_to?(:use_webhooks, nil, global: true)
|
||
|
end
|
||
|
def check_enabled
|
||
|
render_403 unless Webhook.enabled?
|
||
|
end
|
||
|
end
|
||
| app/helpers/settings_helper.rb | ||
|---|---|---|
|
{:name => 'display', :partial => 'settings/display', :label => :label_display},
|
||
|
{:name => 'authentication', :partial => 'settings/authentication',
|
||
|
:label => :label_authentication},
|
||
|
{:name => 'api', :partial => 'settings/api', :label => :label_api},
|
||
|
{:name => 'integrations', :partial => 'settings/api', :label => :label_integrations},
|
||
|
{:name => 'projects', :partial => 'settings/projects', :label => :label_project_plural},
|
||
|
{:name => 'users', :partial => 'settings/users', :label => :label_user_plural},
|
||
|
{:name => 'issues', :partial => 'settings/issues', :label => :label_issue_tracking},
|
||
| app/models/webhook.rb | ||
|---|---|---|
|
before_validation ->(hook){ hook.projects = hook.projects.to_a & hook.setable_projects }
|
||
|
def self.enabled?
|
||
|
Setting.webhooks_enabled?
|
||
|
end
|
||
|
# Triggers the given event for the given object, scheduling qualifying hooks
|
||
|
# to be called.
|
||
|
def self.trigger(event, object)
|
||
|
return unless enabled?
|
||
|
hooks_for(event, object).each do |hook|
|
||
|
payload = hook.payload(event, object)
|
||
|
WebhookJob.perform_later(hook.id, payload.to_json)
|
||
| app/views/my/account.html.erb | ||
|---|---|---|
|
<div class="contextual">
|
||
|
<%= additional_emails_link(@user) %>
|
||
|
<%= link_to(sprite_icon('key', l(:button_change_password)), { :action => 'password'}, :class => 'icon icon-passwd') if @user.change_password_allowed? %>
|
||
|
<%= link_to sprite_icon('webhook', l(:label_webhook_plural)), webhooks_path, class: 'icon icon-webhook' if @user.allowed_to?(:use_webhooks, nil, global: true) %>
|
||
|
<%= link_to sprite_icon('webhook', l(:label_webhook_plural)), webhooks_path, class: 'icon icon-webhook' if Webhook.enabled? && @user.allowed_to?(:use_webhooks, nil, global: true) %>
|
||
|
<%= link_to(sprite_icon('apps', l('label_oauth_authorized_application_plural')), oauth_authorized_applications_path, :class => 'icon icon-applications') if Setting.rest_api_enabled? %>
|
||
|
<%= call_hook(:view_my_account_contextual, :user => @user)%>
|
||
|
</div>
|
||
| app/views/settings/_api.html.erb | ||
|---|---|---|
|
<%= form_tag({:action => 'edit', :tab => 'api'}) do %>
|
||
|
<%= form_tag({:action => 'edit', :tab => 'integrations'}) do %>
|
||
|
<div class="box tabular settings">
|
||
|
<p><%= setting_check_box :rest_api_enabled %></p>
|
||
|
<p><%= setting_check_box :jsonp_enabled %></p>
|
||
|
<p><%= setting_check_box :webhooks_enabled %></p>
|
||
|
</div>
|
||
|
<%= submit_tag l(:button_save) %>
|
||
| config/locales/ar.yml | ||
|---|---|---|
|
label_create_missing_values: Create missing values
|
||
|
button_import: Import
|
||
|
field_total_estimated_hours: Total estimated time
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totals
|
||
|
label_assigned_issues: Assigned issues
|
||
|
label_field_format_enumeration: Key/value list
|
||
| config/locales/az.yml | ||
|---|---|---|
|
label_create_missing_values: Create missing values
|
||
|
button_import: Import
|
||
|
field_total_estimated_hours: Total estimated time
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totals
|
||
|
label_assigned_issues: Assigned issues
|
||
|
label_field_format_enumeration: Key/value list
|
||
| config/locales/bg.yml | ||
|---|---|---|
|
label_relations_mapping: Съответствие между релациите
|
||
|
label_file_content_preview: Предварителен преглед на съдържанието на файла
|
||
|
label_create_missing_values: Създаване на липсващи стойности
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_field_format_enumeration: Списък ключ/стойност
|
||
|
label_default_values_for_new_users: Стойности по подразбиране за нови потребители
|
||
|
label_relations: Релации
|
||
| config/locales/bs.yml | ||
|---|---|---|
|
label_create_missing_values: Kreiraj nedostajuće vrijednosti
|
||
|
button_import: Import
|
||
|
field_total_estimated_hours: Ukupno procijenjeno vrijeme
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Ukupno
|
||
|
label_assigned_issues: Dodijeljeni tiketi
|
||
|
label_field_format_enumeration: Lista ključ/vrijednost
|
||
| config/locales/ca.yml | ||
|---|---|---|
|
label_create_missing_values: "Crear valors no presents"
|
||
|
button_import: "Importar"
|
||
|
field_total_estimated_hours: "Temps total estimat"
|
||
|
label_api: "API"
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: "Totals"
|
||
|
label_assigned_issues: "Incidències assignades"
|
||
|
label_field_format_enumeration: "Llistat clau/valor"
|
||
| config/locales/cs.yml | ||
|---|---|---|
|
label_create_missing_values: Vytvořit chybějící hodnoty
|
||
|
button_import: Import
|
||
|
field_total_estimated_hours: Celkový odhadovaný čas
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Celkem
|
||
|
label_assigned_issues: Přiřazené úkoly
|
||
|
label_field_format_enumeration: Seznam klíčů/hodnot
|
||
| config/locales/da.yml | ||
|---|---|---|
|
label_create_missing_values: Create missing values
|
||
|
button_import: Import
|
||
|
field_total_estimated_hours: Total estimated time
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totals
|
||
|
label_assigned_issues: Assigned issues
|
||
|
label_field_format_enumeration: Key/value list
|
||
| config/locales/de.yml | ||
|---|---|---|
|
label_create_missing_values: Ergänze fehlende Werte
|
||
|
button_import: Importieren
|
||
|
field_total_estimated_hours: Summe des geschätzten Aufwands
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Summe
|
||
|
label_assigned_issues: Zugewiesene Tickets
|
||
|
label_field_format_enumeration: Eigenschaft/Wert-Paare
|
||
| config/locales/el.yml | ||
|---|---|---|
|
label_create_missing_values: Create missing values
|
||
|
button_import: Import
|
||
|
field_total_estimated_hours: Total estimated time
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totals
|
||
|
label_assigned_issues: Assigned issues
|
||
|
label_field_format_enumeration: Key/value list
|
||
| config/locales/en-GB.yml | ||
|---|---|---|
|
label_create_missing_values: Create missing values
|
||
|
button_import: Import
|
||
|
field_total_estimated_hours: Total estimated time
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totals
|
||
|
label_assigned_issues: Assigned issues
|
||
|
label_field_format_enumeration: Key/value list
|
||
| config/locales/en.yml | ||
|---|---|---|
|
setting_thumbnails_size: Thumbnails size (in pixels)
|
||
|
setting_non_working_week_days: Non-working days
|
||
|
setting_jsonp_enabled: Enable JSONP support
|
||
|
setting_webhooks_enabled: Enable Webhooks
|
||
|
setting_default_projects_tracker_ids: Default trackers for new projects
|
||
|
setting_mail_handler_excluded_filenames: Exclude attachments by name
|
||
|
setting_force_default_language_for_anonymous: Force default language for anonymous users
|
||
| ... | ... | |
|
label_create_missing_values: Create missing values
|
||
|
label_position: Position
|
||
|
label_message: Message
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_field_format_enumeration: Key/value list
|
||
|
label_default_values_for_new_users: Default values for new users
|
||
|
label_relations: Relations
|
||
| ... | ... | |
|
webhook_events_issue_updated: Issue updated
|
||
|
webhook_events_issue_deleted: Issue deleted
|
||
|
webhook_url_info: Redmine will send a POST request to this URL whenever one of the selected events occurs in one of the selected projects.
|
||
|
webhook_secret_info_html: If provided, Redmine will use this to create a hash signature that is sent with each delivery as the value of the X-Redmine-Signature-256 header.
|
||
|
webhook_secret_info_html: If provided, Redmine will use this to create a hash signature that is sent with each delivery as the value of the X-Redmine-Signature-256 header.
|
||
|
button_login: Login
|
||
|
button_submit: Submit
|
||
| config/locales/es-PA.yml | ||
|---|---|---|
|
label_create_missing_values: Crear valores no presentes
|
||
|
button_import: Importar
|
||
|
field_total_estimated_hours: Total de Tiempo Estimado
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totales
|
||
|
label_assigned_issues: Incidencias Asignadas
|
||
|
label_field_format_enumeration: Lista Llave/valor
|
||
| config/locales/es.yml | ||
|---|---|---|
|
label_create_missing_values: Crear valores no presentes
|
||
|
button_import: Importar
|
||
|
field_total_estimated_hours: Total de Tiempo Estimado
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totales
|
||
|
label_assigned_issues: Peticiones Asignadas
|
||
|
label_field_format_enumeration: Lista Llave/valor
|
||
| config/locales/et.yml | ||
|---|---|---|
|
label_create_missing_values: "Loo puuduolevad väärtused"
|
||
|
button_import: "Import"
|
||
|
field_total_estimated_hours: "Ennustatud aja summa"
|
||
|
label_api: "API"
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: "Summad"
|
||
|
label_assigned_issues: "Määratud väärtused"
|
||
|
label_field_format_enumeration: "Võtme/väärtuse nimekiri"
|
||
| config/locales/eu.yml | ||
|---|---|---|
|
label_create_missing_values: Create missing values
|
||
|
button_import: Import
|
||
|
field_total_estimated_hours: Total estimated time
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totals
|
||
|
label_assigned_issues: Assigned issues
|
||
|
label_field_format_enumeration: Key/value list
|
||
| config/locales/fa.yml | ||
|---|---|---|
|
label_relations_mapping: نگاشت ارتباطات
|
||
|
label_file_content_preview: نمایش محتویات بخش
|
||
|
label_create_missing_values: ساختن مقادیر ناموجود
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_field_format_enumeration: فهرست کلید/مقدار
|
||
|
label_default_values_for_new_users: مقادیر پیشفرض برای کاربران جدید
|
||
|
label_relations: ارتباطات
|
||
| config/locales/fi.yml | ||
|---|---|---|
|
label_create_missing_values: Create missing values
|
||
|
button_import: Import
|
||
|
field_total_estimated_hours: Total estimated time
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totals
|
||
|
label_assigned_issues: Assigned issues
|
||
|
label_field_format_enumeration: Key/value list
|
||
| config/locales/fr.yml | ||
|---|---|---|
|
label_fields_mapping: Correspondance des champs
|
||
|
label_file_content_preview: Aperçu du contenu du fichier
|
||
|
label_create_missing_values: Créer les valeurs manquantes
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_field_format_enumeration: Liste clé/valeur
|
||
|
label_default_values_for_new_users: Valeurs par défaut pour les nouveaux utilisateurs
|
||
|
label_relations: Relations
|
||
| config/locales/gl.yml | ||
|---|---|---|
|
label_create_missing_values: Crear valores non presentes
|
||
|
button_import: Importar
|
||
|
field_total_estimated_hours: Total de tempo estimado
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totais
|
||
|
label_assigned_issues: Peticións asignadas
|
||
|
label_field_format_enumeration: Listaxe chave/valor
|
||
| config/locales/he.yml | ||
|---|---|---|
|
label_create_missing_values: Create missing values
|
||
|
button_import: Import
|
||
|
field_total_estimated_hours: Total estimated time
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totals
|
||
|
label_assigned_issues: Assigned issues
|
||
|
label_field_format_enumeration: Key/value list
|
||
| config/locales/hr.yml | ||
|---|---|---|
|
label_create_missing_values: Create missing values
|
||
|
button_import: Import
|
||
|
field_total_estimated_hours: Total estimated time
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totals
|
||
|
label_assigned_issues: Assigned issues
|
||
|
label_field_format_enumeration: Key/value list
|
||
| config/locales/hu.yml | ||
|---|---|---|
|
label_create_missing_values: Hiányzó értékek létrehozása
|
||
|
button_import: Importálás
|
||
|
field_total_estimated_hours: Összes becsült óra
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Összesítések
|
||
|
label_assigned_issues: Neki kiosztott feladatok
|
||
|
label_field_format_enumeration: Értékpár-lista
|
||
| config/locales/id.yml | ||
|---|---|---|
|
label_create_missing_values: Create missing values
|
||
|
button_import: Import
|
||
|
field_total_estimated_hours: Total estimated time
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totals
|
||
|
label_assigned_issues: Assigned issues
|
||
|
label_field_format_enumeration: Key/value list
|
||
| config/locales/it.yml | ||
|---|---|---|
|
label_relations_mapping: Mappatura delle relazioni
|
||
|
label_file_content_preview: Anteprima del contenuto del file
|
||
|
label_create_missing_values: Crea valori mancanti
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_field_format_enumeration: Elenco chiave/valore
|
||
|
label_default_values_for_new_users: Valori predefiniti per i nuovi utenti
|
||
|
label_relations: Relazioni
|
||
| config/locales/ja.yml | ||
|---|---|---|
|
permission_edit_documents: 文書の編集
|
||
|
permission_delete_documents: 文書の削除
|
||
|
setting_jsonp_enabled: JSONPを有効にする
|
||
|
setting_webhooks_enabled: Webhooksを有効にする
|
||
|
field_inherit_members: メンバーを継承
|
||
|
field_closed_on: 終了日
|
||
|
field_generate_password: パスワードを自動生成
|
||
| ... | ... | |
|
label_message: メッセージ
|
||
|
button_import: インポート
|
||
|
field_total_estimated_hours: 合計予定工数
|
||
|
label_api: API
|
||
|
label_integrations: 連携
|
||
|
label_total_plural: 合計
|
||
|
label_assigned_issues: 担当しているチケット
|
||
|
label_field_format_enumeration: キー・バリュー リスト
|
||
| config/locales/ko.yml | ||
|---|---|---|
|
label_create_missing_values: 값이 없으면 자동으로 만들기
|
||
|
button_import: 가져오기
|
||
|
field_total_estimated_hours: 추정 시간
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: 합계
|
||
|
label_assigned_issues: 할당된 일감
|
||
|
label_field_format_enumeration: 키/값 목록
|
||
| config/locales/lt.yml | ||
|---|---|---|
|
label_fields_mapping: Laukų sujungimas
|
||
|
label_file_content_preview: Failo turinio peržiūra
|
||
|
label_create_missing_values: Sukurti trūkstamas reikšmes
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_field_format_enumeration: Raktas/reikšmė sąrašas
|
||
|
label_default_values_for_new_users: Numatytosios reikšmės naujiems vartotojams
|
||
| config/locales/lv.yml | ||
|---|---|---|
|
label_create_missing_values: Create missing values
|
||
|
button_import: Import
|
||
|
field_total_estimated_hours: Total estimated time
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totals
|
||
|
label_assigned_issues: Assigned issues
|
||
|
label_field_format_enumeration: Key/value list
|
||
| config/locales/mk.yml | ||
|---|---|---|
|
label_create_missing_values: Create missing values
|
||
|
button_import: Import
|
||
|
field_total_estimated_hours: Total estimated time
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totals
|
||
|
label_assigned_issues: Assigned issues
|
||
|
label_field_format_enumeration: Key/value list
|
||
| config/locales/mn.yml | ||
|---|---|---|
|
label_create_missing_values: Create missing values
|
||
|
button_import: Import
|
||
|
field_total_estimated_hours: Total estimated time
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Нийлбэр
|
||
|
label_assigned_issues: Assigned issues
|
||
|
label_field_format_enumeration: Key/value list
|
||
| config/locales/nl.yml | ||
|---|---|---|
|
label_create_missing_values: Ontbrekende waarden invullen
|
||
|
button_import: Importeren
|
||
|
field_total_estimated_hours: Geschatte totaaltijd
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totalen
|
||
|
label_assigned_issues: Toegewezen issues
|
||
|
label_field_format_enumeration: Sleutel/waarde lijst
|
||
| config/locales/no.yml | ||
|---|---|---|
|
label_create_missing_values: Create missing values
|
||
|
button_import: Import
|
||
|
field_total_estimated_hours: Total estimated time
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totals
|
||
|
label_assigned_issues: Assigned issues
|
||
|
label_field_format_enumeration: Key/value list
|
||
| config/locales/pl.yml | ||
|---|---|---|
|
label_relations_mapping: Mapowanie relacji
|
||
|
label_file_content_preview: Podgląd treści pliku
|
||
|
label_create_missing_values: Utwórz brakujące wartości
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_field_format_enumeration: "Lista klucz/wartość"
|
||
|
label_default_values_for_new_users: Domyślne wartości dla nowych użytkowników
|
||
|
label_relations: Relacje
|
||
| config/locales/pt-BR.yml | ||
|---|---|---|
|
label_create_missing_values: Criar valores em falta
|
||
|
button_import: Importar
|
||
|
field_total_estimated_hours: Tempo estimado geral
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totais
|
||
|
label_assigned_issues: Tarefas atribuídas
|
||
|
label_field_format_enumeration: Chave/Lista de valores
|
||
| config/locales/pt.yml | ||
|---|---|---|
|
label_create_missing_values: Criar os valores em falta
|
||
|
button_import: Importar
|
||
|
field_total_estimated_hours: Total de tempo estimado
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totais
|
||
|
label_assigned_issues: Tarefas atribuídas
|
||
|
label_field_format_enumeration: Lista chave/valor
|
||
| config/locales/ro.yml | ||
|---|---|---|
|
label_create_missing_values: Create missing values
|
||
|
button_import: Import
|
||
|
field_total_estimated_hours: Total estimated time
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totals
|
||
|
label_assigned_issues: Assigned issues
|
||
|
label_field_format_enumeration: Key/value list
|
||
| config/locales/ru.yml | ||
|---|---|---|
|
label_create_missing_values: Создать недостающие значения
|
||
|
button_import: Импорт
|
||
|
field_total_estimated_hours: Общая оценка временных затрат
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Итоги
|
||
|
label_assigned_issues: Назначенные задачи
|
||
|
label_field_format_enumeration: Список ключ/значение
|
||
| config/locales/sk.yml | ||
|---|---|---|
|
label_create_missing_values: Create missing values
|
||
|
button_import: Import
|
||
|
field_total_estimated_hours: Total estimated time
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totals
|
||
|
label_assigned_issues: Assigned issues
|
||
|
label_field_format_enumeration: Key/value list
|
||
| config/locales/sl.yml | ||
|---|---|---|
|
label_create_missing_values: Create missing values
|
||
|
button_import: Import
|
||
|
field_total_estimated_hours: Total estimated time
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totals
|
||
|
label_assigned_issues: Assigned issues
|
||
|
label_field_format_enumeration: Key/value list
|
||
| config/locales/sq.yml | ||
|---|---|---|
|
label_relations_mapping: Përshoqërim marrëdhëniesh
|
||
|
label_file_content_preview: Paraparje lënde kartele
|
||
|
label_create_missing_values: Krijo vlera që mungojnë
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_field_format_enumeration: Listë kyç/vlerë
|
||
|
label_default_values_for_new_users: Vlera parazgjedhje për përdorues të rinj
|
||
|
label_relations: Marrëdhënie
|
||
| config/locales/sr-YU.yml | ||
|---|---|---|
|
label_create_missing_values: Create missing values
|
||
|
button_import: Import
|
||
|
field_total_estimated_hours: Total estimated time
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totals
|
||
|
label_assigned_issues: Assigned issues
|
||
|
label_field_format_enumeration: Key/value list
|
||
| config/locales/sr.yml | ||
|---|---|---|
|
label_create_missing_values: Create missing values
|
||
|
button_import: Import
|
||
|
field_total_estimated_hours: Total estimated time
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totals
|
||
|
label_assigned_issues: Assigned issues
|
||
|
label_field_format_enumeration: Key/value list
|
||
| config/locales/sv.yml | ||
|---|---|---|
|
label_create_missing_values: Skapa saknade värden
|
||
|
button_import: Importera
|
||
|
field_total_estimated_hours: Totalt beräknad tid
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totaler
|
||
|
label_assigned_issues: Tilldelade ärenden
|
||
|
label_field_format_enumeration: Nyckel/värde-lista
|
||
| config/locales/ta-IN.yml | ||
|---|---|---|
|
label_create_missing_values: விடுபட்ட மதிப்புகளை உருவாக்கவும்
|
||
|
button_import: இறக்குமதி
|
||
|
field_total_estimated_hours: மொத்த மதிப்பிடப்பட்ட நேரம்
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: மொத்தம்
|
||
|
label_assigned_issues: ஒதுக்கப்பட்ட சிக்கல்கள்
|
||
|
label_field_format_enumeration: சாவி / மதிப்பு பட்டியலில்
|
||
| config/locales/th.yml | ||
|---|---|---|
|
label_create_missing_values: Create missing values
|
||
|
button_import: Import
|
||
|
field_total_estimated_hours: Total estimated time
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Totals
|
||
|
label_assigned_issues: Assigned issues
|
||
|
label_field_format_enumeration: Key/value list
|
||
| config/locales/tr.yml | ||
|---|---|---|
|
label_create_missing_values: Eşleşlmeyen alanları oluştur
|
||
|
button_import: İçeri aktar
|
||
|
field_total_estimated_hours: Toplam tahmini zaman
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Toplamlar
|
||
|
label_assigned_issues: Atanan işler
|
||
|
label_field_format_enumeration: Anahtar/Değer listesi
|
||
| config/locales/uk.yml | ||
|---|---|---|
|
label_create_missing_values: Створити відсутні значення
|
||
|
button_import: Імпорт
|
||
|
field_total_estimated_hours: Всього залишилось часу
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Висновки
|
||
|
label_assigned_issues: Призначені задачі
|
||
|
label_field_format_enumeration: Ключ/значення список
|
||
| config/locales/vi.yml | ||
|---|---|---|
|
label_create_missing_values: Tạo các giá trị còn thiếu
|
||
|
button_import: Import
|
||
|
field_total_estimated_hours: Tổng thời gian ước tính
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: Tổng
|
||
|
label_assigned_issues: Các vấn đề được giao
|
||
|
label_field_format_enumeration: Danh sách khóa / giá trị
|
||
| config/locales/zh-TW.yml | ||
|---|---|---|
|
label_fields_mapping: 欄位對應
|
||
|
label_file_content_preview: 檔案內容預覽
|
||
|
label_create_missing_values: 建立缺少的數值
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_field_format_enumeration: 鍵/值 清單
|
||
|
label_default_values_for_new_users: 新用戶使用之預設值
|
||
|
label_relations: 關聯
|
||
| config/locales/zh.yml | ||
|---|---|---|
|
label_create_missing_values: 创建缺失的数值
|
||
|
button_import: 导入
|
||
|
field_total_estimated_hours: 预估工时统计
|
||
|
label_api: API
|
||
|
label_integrations: Integrations
|
||
|
label_total_plural: 总计
|
||
|
label_assigned_issues: 被指派的问题
|
||
|
label_field_format_enumeration: 键/值 清单
|
||
| config/settings.yml | ||
|---|---|---|
|
jsonp_enabled:
|
||
|
default: 0
|
||
|
security_notifications: 1
|
||
|
webhooks_enabled:
|
||
|
default: 1
|
||
|
default_notification_option:
|
||
|
default: 'only_assigned'
|
||
|
emails_header:
|
||
| test/functional/my_controller_test.rb | ||
|---|---|---|
|
assert_select 'select[name=?]', 'user[language]'
|
||
|
end
|
||
|
def test_my_account_should_toggle_webhook_link_with_setting
|
||
|
User.find(2).roles.first.add_permission!(:use_webhooks)
|
||
|
get :account
|
||
|
assert_response :success
|
||
|
assert_select 'a.icon-webhook', 1
|
||
|
with_settings webhooks_enabled: '0' do
|
||
|
get :account
|
||
|
assert_response :success
|
||
|
assert_select 'a.icon-webhook', 0
|
||
|
end
|
||
|
end
|
||
|
def test_my_account_with_avatar_enabled_should_link_to_edit_avatar
|
||
|
with_settings :gravatar_enabled => '1' do
|
||
|
Redmine::Configuration.with 'avatar_server_url' => 'https://gravatar.com' do
|
||
| test/functional/webhooks_controller_test.rb | ||
|---|---|---|
|
assert_select 'td', text: @other_hook.url, count: 0
|
||
|
end
|
||
|
test "should return not found when disabled" do
|
||
|
with_settings webhooks_enabled: '0' do
|
||
|
get :index
|
||
|
assert_response :forbidden
|
||
|
get :new
|
||
|
assert_response :forbidden
|
||
|
end
|
||
|
end
|
||
|
test "should get new" do
|
||
|
get :new
|
||
|
assert_response :success
|
||
| test/unit/webhook_test.rb | ||
|---|---|---|
|
end
|
||
|
end
|
||
|
test "enabled? should follow setting flag" do
|
||
|
assert Webhook.enabled?
|
||
|
with_settings webhooks_enabled: '0' do
|
||
|
assert_not Webhook.enabled?
|
||
|
end
|
||
|
with_settings webhooks_enabled: '1' do
|
||
|
assert Webhook.enabled?
|
||
|
end
|
||
|
end
|
||
|
test "trigger should not enqueue jobs when disabled" do
|
||
|
create_hook
|
||
|
with_settings webhooks_enabled: '0' do
|
||
|
assert_no_enqueued_jobs do
|
||
|
Webhook.trigger('issue.created', @issue)
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
test "should compute payload" do
|
||
|
hook = create_hook
|
||
|
payload = hook.payload('issue.created', @issue)
|
||