Feature #29664 » Allow-administrators-to-disable-webhooks-from-settings.patch
| app/controllers/webhooks_controller.rb | ||
|---|---|---|
| 4 | 4 |
self.main_menu = false |
| 5 | 5 | |
| 6 | 6 |
before_action :require_login |
| 7 |
before_action :check_enabled |
|
| 7 | 8 |
before_action :authorize |
| 8 | 9 | |
| 9 | 10 |
before_action :find_webhook, only: [:edit, :update, :destroy] |
| ... | ... | |
| 62 | 63 |
def authorize |
| 63 | 64 |
deny_access unless User.current.allowed_to?(:use_webhooks, nil, global: true) |
| 64 | 65 |
end |
| 66 | ||
| 67 |
def check_enabled |
|
| 68 |
render_403 unless Webhook.enabled? |
|
| 69 |
end |
|
| 65 | 70 |
end |
| app/helpers/settings_helper.rb | ||
|---|---|---|
| 25 | 25 |
{:name => 'display', :partial => 'settings/display', :label => :label_display},
|
| 26 | 26 |
{:name => 'authentication', :partial => 'settings/authentication',
|
| 27 | 27 |
:label => :label_authentication}, |
| 28 |
{:name => 'api', :partial => 'settings/api', :label => :label_api},
|
|
| 28 |
{:name => 'integrations', :partial => 'settings/api', :label => :label_integrations},
|
|
| 29 | 29 |
{:name => 'projects', :partial => 'settings/projects', :label => :label_project_plural},
|
| 30 | 30 |
{:name => 'users', :partial => 'settings/users', :label => :label_user_plural},
|
| 31 | 31 |
{:name => 'issues', :partial => 'settings/issues', :label => :label_issue_tracking},
|
| app/models/webhook.rb | ||
|---|---|---|
| 42 | 42 | |
| 43 | 43 |
before_validation ->(hook){ hook.projects = hook.projects.to_a & hook.setable_projects }
|
| 44 | 44 | |
| 45 |
def self.enabled? |
|
| 46 |
Setting.webhooks_enabled? |
|
| 47 |
end |
|
| 48 | ||
| 45 | 49 |
# Triggers the given event for the given object, scheduling qualifying hooks |
| 46 | 50 |
# to be called. |
| 47 | 51 |
def self.trigger(event, object) |
| 52 |
return unless enabled? |
|
| 53 | ||
| 48 | 54 |
hooks_for(event, object).each do |hook| |
| 49 | 55 |
payload = hook.payload(event, object) |
| 50 | 56 |
WebhookJob.perform_later(hook.id, payload.to_json) |
| app/views/my/account.html.erb | ||
|---|---|---|
| 1 | 1 |
<div class="contextual"> |
| 2 | 2 |
<%= additional_emails_link(@user) %> |
| 3 | 3 |
<%= link_to(sprite_icon('key', l(:button_change_password)), { :action => 'password'}, :class => 'icon icon-passwd') if @user.change_password_allowed? %>
|
| 4 |
<%= link_to sprite_icon('webhook', l(:label_webhook_plural)), webhooks_path, class: 'icon icon-webhook' if @user.allowed_to?(:use_webhooks, nil, global: true) %>
|
|
| 4 |
<%= 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) %>
|
|
| 5 | 5 |
<%= link_to(sprite_icon('apps', l('label_oauth_authorized_application_plural')), oauth_authorized_applications_path, :class => 'icon icon-applications') if Setting.rest_api_enabled? %>
|
| 6 | 6 |
<%= call_hook(:view_my_account_contextual, :user => @user)%> |
| 7 | 7 |
</div> |
| app/views/settings/_api.html.erb | ||
|---|---|---|
| 1 |
<%= form_tag({:action => 'edit', :tab => 'api'}) do %>
|
|
| 1 |
<%= form_tag({:action => 'edit', :tab => 'integrations'}) do %>
|
|
| 2 | 2 | |
| 3 | 3 |
<div class="box tabular settings"> |
| 4 | 4 |
<p><%= setting_check_box :rest_api_enabled %></p> |
| 5 | 5 | |
| 6 | 6 |
<p><%= setting_check_box :jsonp_enabled %></p> |
| 7 | ||
| 8 |
<p><%= setting_check_box :webhooks_enabled %></p> |
|
| 7 | 9 |
</div> |
| 8 | 10 | |
| 9 | 11 |
<%= submit_tag l(:button_save) %> |
| config/locales/ar.yml | ||
|---|---|---|
| 1148 | 1148 |
label_create_missing_values: Create missing values |
| 1149 | 1149 |
button_import: Import |
| 1150 | 1150 |
field_total_estimated_hours: Total estimated time |
| 1151 |
label_api: API
|
|
| 1151 |
label_integrations: Integrations
|
|
| 1152 | 1152 |
label_total_plural: Totals |
| 1153 | 1153 |
label_assigned_issues: Assigned issues |
| 1154 | 1154 |
label_field_format_enumeration: Key/value list |
| config/locales/az.yml | ||
|---|---|---|
| 1239 | 1239 |
label_create_missing_values: Create missing values |
| 1240 | 1240 |
button_import: Import |
| 1241 | 1241 |
field_total_estimated_hours: Total estimated time |
| 1242 |
label_api: API
|
|
| 1242 |
label_integrations: Integrations
|
|
| 1243 | 1243 |
label_total_plural: Totals |
| 1244 | 1244 |
label_assigned_issues: Assigned issues |
| 1245 | 1245 |
label_field_format_enumeration: Key/value list |
| config/locales/bg.yml | ||
|---|---|---|
| 1117 | 1117 |
label_relations_mapping: Съответствие между релациите |
| 1118 | 1118 |
label_file_content_preview: Предварителен преглед на съдържанието на файла |
| 1119 | 1119 |
label_create_missing_values: Създаване на липсващи стойности |
| 1120 |
label_api: API
|
|
| 1120 |
label_integrations: Integrations
|
|
| 1121 | 1121 |
label_field_format_enumeration: Списък ключ/стойност |
| 1122 | 1122 |
label_default_values_for_new_users: Стойности по подразбиране за нови потребители |
| 1123 | 1123 |
label_relations: Релации |
| config/locales/bs.yml | ||
|---|---|---|
| 1149 | 1149 |
label_create_missing_values: Kreiraj nedostajuće vrijednosti |
| 1150 | 1150 |
button_import: Import |
| 1151 | 1151 |
field_total_estimated_hours: Ukupno procijenjeno vrijeme |
| 1152 |
label_api: API
|
|
| 1152 |
label_integrations: Integrations
|
|
| 1153 | 1153 |
label_total_plural: Ukupno |
| 1154 | 1154 |
label_assigned_issues: Dodijeljeni tiketi |
| 1155 | 1155 |
label_field_format_enumeration: Lista ključ/vrijednost |
| config/locales/ca.yml | ||
|---|---|---|
| 1143 | 1143 |
label_create_missing_values: "Crear valors no presents" |
| 1144 | 1144 |
button_import: "Importar" |
| 1145 | 1145 |
field_total_estimated_hours: "Temps total estimat" |
| 1146 |
label_api: "API"
|
|
| 1146 |
label_integrations: Integrations
|
|
| 1147 | 1147 |
label_total_plural: "Totals" |
| 1148 | 1148 |
label_assigned_issues: "Incidències assignades" |
| 1149 | 1149 |
label_field_format_enumeration: "Llistat clau/valor" |
| config/locales/cs.yml | ||
|---|---|---|
| 1147 | 1147 |
label_create_missing_values: Vytvořit chybějící hodnoty |
| 1148 | 1148 |
button_import: Import |
| 1149 | 1149 |
field_total_estimated_hours: Celkový odhadovaný čas |
| 1150 |
label_api: API
|
|
| 1150 |
label_integrations: Integrations
|
|
| 1151 | 1151 |
label_total_plural: Celkem |
| 1152 | 1152 |
label_assigned_issues: Přiřazené úkoly |
| 1153 | 1153 |
label_field_format_enumeration: Seznam klíčů/hodnot |
| config/locales/da.yml | ||
|---|---|---|
| 1165 | 1165 |
label_create_missing_values: Create missing values |
| 1166 | 1166 |
button_import: Import |
| 1167 | 1167 |
field_total_estimated_hours: Total estimated time |
| 1168 |
label_api: API
|
|
| 1168 |
label_integrations: Integrations
|
|
| 1169 | 1169 |
label_total_plural: Totals |
| 1170 | 1170 |
label_assigned_issues: Assigned issues |
| 1171 | 1171 |
label_field_format_enumeration: Key/value list |
| config/locales/de.yml | ||
|---|---|---|
| 1220 | 1220 |
label_create_missing_values: Ergänze fehlende Werte |
| 1221 | 1221 |
button_import: Importieren |
| 1222 | 1222 |
field_total_estimated_hours: Summe des geschätzten Aufwands |
| 1223 |
label_api: API
|
|
| 1223 |
label_integrations: Integrations
|
|
| 1224 | 1224 |
label_total_plural: Summe |
| 1225 | 1225 |
label_assigned_issues: Zugewiesene Tickets |
| 1226 | 1226 |
label_field_format_enumeration: Eigenschaft/Wert-Paare |
| config/locales/el.yml | ||
|---|---|---|
| 1148 | 1148 |
label_create_missing_values: Create missing values |
| 1149 | 1149 |
button_import: Import |
| 1150 | 1150 |
field_total_estimated_hours: Total estimated time |
| 1151 |
label_api: API
|
|
| 1151 |
label_integrations: Integrations
|
|
| 1152 | 1152 |
label_total_plural: Totals |
| 1153 | 1153 |
label_assigned_issues: Assigned issues |
| 1154 | 1154 |
label_field_format_enumeration: Key/value list |
| config/locales/en-GB.yml | ||
|---|---|---|
| 1155 | 1155 |
label_create_missing_values: Create missing values |
| 1156 | 1156 |
button_import: Import |
| 1157 | 1157 |
field_total_estimated_hours: Total estimated time |
| 1158 |
label_api: API
|
|
| 1158 |
label_integrations: Integrations
|
|
| 1159 | 1159 |
label_total_plural: Totals |
| 1160 | 1160 |
label_assigned_issues: Assigned issues |
| 1161 | 1161 |
label_field_format_enumeration: Key/value list |
| config/locales/en.yml | ||
|---|---|---|
| 505 | 505 |
setting_thumbnails_size: Thumbnails size (in pixels) |
| 506 | 506 |
setting_non_working_week_days: Non-working days |
| 507 | 507 |
setting_jsonp_enabled: Enable JSONP support |
| 508 |
setting_webhooks_enabled: Enable Webhooks |
|
| 508 | 509 |
setting_default_projects_tracker_ids: Default trackers for new projects |
| 509 | 510 |
setting_mail_handler_excluded_filenames: Exclude attachments by name |
| 510 | 511 |
setting_force_default_language_for_anonymous: Force default language for anonymous users |
| ... | ... | |
| 1124 | 1125 |
label_create_missing_values: Create missing values |
| 1125 | 1126 |
label_position: Position |
| 1126 | 1127 |
label_message: Message |
| 1127 |
label_api: API
|
|
| 1128 |
label_integrations: Integrations
|
|
| 1128 | 1129 |
label_field_format_enumeration: Key/value list |
| 1129 | 1130 |
label_default_values_for_new_users: Default values for new users |
| 1130 | 1131 |
label_relations: Relations |
| ... | ... | |
| 1182 | 1183 |
webhook_events_issue_updated: Issue updated |
| 1183 | 1184 |
webhook_events_issue_deleted: Issue deleted |
| 1184 | 1185 |
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. |
| 1185 |
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.
|
|
| 1186 |
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. |
|
| 1186 | 1187 | |
| 1187 | 1188 |
button_login: Login |
| 1188 | 1189 |
button_submit: Submit |
| config/locales/es-PA.yml | ||
|---|---|---|
| 1184 | 1184 |
label_create_missing_values: Crear valores no presentes |
| 1185 | 1185 |
button_import: Importar |
| 1186 | 1186 |
field_total_estimated_hours: Total de Tiempo Estimado |
| 1187 |
label_api: API
|
|
| 1187 |
label_integrations: Integrations
|
|
| 1188 | 1188 |
label_total_plural: Totales |
| 1189 | 1189 |
label_assigned_issues: Incidencias Asignadas |
| 1190 | 1190 |
label_field_format_enumeration: Lista Llave/valor |
| config/locales/es.yml | ||
|---|---|---|
| 1182 | 1182 |
label_create_missing_values: Crear valores no presentes |
| 1183 | 1183 |
button_import: Importar |
| 1184 | 1184 |
field_total_estimated_hours: Total de Tiempo Estimado |
| 1185 |
label_api: API
|
|
| 1185 |
label_integrations: Integrations
|
|
| 1186 | 1186 |
label_total_plural: Totales |
| 1187 | 1187 |
label_assigned_issues: Peticiones Asignadas |
| 1188 | 1188 |
label_field_format_enumeration: Lista Llave/valor |
| config/locales/et.yml | ||
|---|---|---|
| 1153 | 1153 |
label_create_missing_values: "Loo puuduolevad väärtused" |
| 1154 | 1154 |
button_import: "Import" |
| 1155 | 1155 |
field_total_estimated_hours: "Ennustatud aja summa" |
| 1156 |
label_api: "API"
|
|
| 1156 |
label_integrations: Integrations
|
|
| 1157 | 1157 |
label_total_plural: "Summad" |
| 1158 | 1158 |
label_assigned_issues: "Määratud väärtused" |
| 1159 | 1159 |
label_field_format_enumeration: "Võtme/väärtuse nimekiri" |
| config/locales/eu.yml | ||
|---|---|---|
| 1149 | 1149 |
label_create_missing_values: Create missing values |
| 1150 | 1150 |
button_import: Import |
| 1151 | 1151 |
field_total_estimated_hours: Total estimated time |
| 1152 |
label_api: API
|
|
| 1152 |
label_integrations: Integrations
|
|
| 1153 | 1153 |
label_total_plural: Totals |
| 1154 | 1154 |
label_assigned_issues: Assigned issues |
| 1155 | 1155 |
label_field_format_enumeration: Key/value list |
| config/locales/fa.yml | ||
|---|---|---|
| 1110 | 1110 |
label_relations_mapping: نگاشت ارتباطات |
| 1111 | 1111 |
label_file_content_preview: نمایش محتویات بخش |
| 1112 | 1112 |
label_create_missing_values: ساختن مقادیر ناموجود |
| 1113 |
label_api: API
|
|
| 1113 |
label_integrations: Integrations
|
|
| 1114 | 1114 |
label_field_format_enumeration: فهرست کلید/مقدار |
| 1115 | 1115 |
label_default_values_for_new_users: مقادیر پیشفرض برای کاربران جدید |
| 1116 | 1116 |
label_relations: ارتباطات |
| config/locales/fi.yml | ||
|---|---|---|
| 1166 | 1166 |
label_create_missing_values: Create missing values |
| 1167 | 1167 |
button_import: Import |
| 1168 | 1168 |
field_total_estimated_hours: Total estimated time |
| 1169 |
label_api: API
|
|
| 1169 |
label_integrations: Integrations
|
|
| 1170 | 1170 |
label_total_plural: Totals |
| 1171 | 1171 |
label_assigned_issues: Assigned issues |
| 1172 | 1172 |
label_field_format_enumeration: Key/value list |
| config/locales/fr.yml | ||
|---|---|---|
| 1005 | 1005 |
label_fields_mapping: Correspondance des champs |
| 1006 | 1006 |
label_file_content_preview: Aperçu du contenu du fichier |
| 1007 | 1007 |
label_create_missing_values: Créer les valeurs manquantes |
| 1008 |
label_api: API
|
|
| 1008 |
label_integrations: Integrations
|
|
| 1009 | 1009 |
label_field_format_enumeration: Liste clé/valeur |
| 1010 | 1010 |
label_default_values_for_new_users: Valeurs par défaut pour les nouveaux utilisateurs |
| 1011 | 1011 |
label_relations: Relations |
| config/locales/gl.yml | ||
|---|---|---|
| 1157 | 1157 |
label_create_missing_values: Crear valores non presentes |
| 1158 | 1158 |
button_import: Importar |
| 1159 | 1159 |
field_total_estimated_hours: Total de tempo estimado |
| 1160 |
label_api: API
|
|
| 1160 |
label_integrations: Integrations
|
|
| 1161 | 1161 |
label_total_plural: Totais |
| 1162 | 1162 |
label_assigned_issues: Peticións asignadas |
| 1163 | 1163 |
label_field_format_enumeration: Listaxe chave/valor |
| config/locales/he.yml | ||
|---|---|---|
| 1153 | 1153 |
label_create_missing_values: Create missing values |
| 1154 | 1154 |
button_import: Import |
| 1155 | 1155 |
field_total_estimated_hours: Total estimated time |
| 1156 |
label_api: API
|
|
| 1156 |
label_integrations: Integrations
|
|
| 1157 | 1157 |
label_total_plural: Totals |
| 1158 | 1158 |
label_assigned_issues: Assigned issues |
| 1159 | 1159 |
label_field_format_enumeration: Key/value list |
| config/locales/hr.yml | ||
|---|---|---|
| 1145 | 1145 |
label_create_missing_values: Create missing values |
| 1146 | 1146 |
button_import: Import |
| 1147 | 1147 |
field_total_estimated_hours: Total estimated time |
| 1148 |
label_api: API
|
|
| 1148 |
label_integrations: Integrations
|
|
| 1149 | 1149 |
label_total_plural: Totals |
| 1150 | 1150 |
label_assigned_issues: Assigned issues |
| 1151 | 1151 |
label_field_format_enumeration: Key/value list |
| config/locales/hu.yml | ||
|---|---|---|
| 1154 | 1154 |
label_create_missing_values: Hiányzó értékek létrehozása |
| 1155 | 1155 |
button_import: Importálás |
| 1156 | 1156 |
field_total_estimated_hours: Összes becsült óra |
| 1157 |
label_api: API
|
|
| 1157 |
label_integrations: Integrations
|
|
| 1158 | 1158 |
label_total_plural: Összesítések |
| 1159 | 1159 |
label_assigned_issues: Neki kiosztott feladatok |
| 1160 | 1160 |
label_field_format_enumeration: Értékpár-lista |
| config/locales/id.yml | ||
|---|---|---|
| 1150 | 1150 |
label_create_missing_values: Create missing values |
| 1151 | 1151 |
button_import: Import |
| 1152 | 1152 |
field_total_estimated_hours: Total estimated time |
| 1153 |
label_api: API
|
|
| 1153 |
label_integrations: Integrations
|
|
| 1154 | 1154 |
label_total_plural: Totals |
| 1155 | 1155 |
label_assigned_issues: Assigned issues |
| 1156 | 1156 |
label_field_format_enumeration: Key/value list |
| config/locales/it.yml | ||
|---|---|---|
| 1121 | 1121 |
label_relations_mapping: Mappatura delle relazioni |
| 1122 | 1122 |
label_file_content_preview: Anteprima del contenuto del file |
| 1123 | 1123 |
label_create_missing_values: Crea valori mancanti |
| 1124 |
label_api: API
|
|
| 1124 |
label_integrations: Integrations
|
|
| 1125 | 1125 |
label_field_format_enumeration: Elenco chiave/valore |
| 1126 | 1126 |
label_default_values_for_new_users: Valori predefiniti per i nuovi utenti |
| 1127 | 1127 |
label_relations: Relazioni |
| config/locales/ja.yml | ||
|---|---|---|
| 1090 | 1090 |
permission_edit_documents: 文書の編集 |
| 1091 | 1091 |
permission_delete_documents: 文書の削除 |
| 1092 | 1092 |
setting_jsonp_enabled: JSONPを有効にする |
| 1093 |
setting_webhooks_enabled: Webhooksを有効にする |
|
| 1093 | 1094 |
field_inherit_members: メンバーを継承 |
| 1094 | 1095 |
field_closed_on: 終了日 |
| 1095 | 1096 |
field_generate_password: パスワードを自動生成 |
| ... | ... | |
| 1177 | 1178 |
label_message: メッセージ |
| 1178 | 1179 |
button_import: インポート |
| 1179 | 1180 |
field_total_estimated_hours: 合計予定工数 |
| 1180 |
label_api: API
|
|
| 1181 |
label_integrations: 連携
|
|
| 1181 | 1182 |
label_total_plural: 合計 |
| 1182 | 1183 |
label_assigned_issues: 担当しているチケット |
| 1183 | 1184 |
label_field_format_enumeration: キー・バリュー リスト |
| config/locales/ko.yml | ||
|---|---|---|
| 1183 | 1183 |
label_create_missing_values: 값이 없으면 자동으로 만들기 |
| 1184 | 1184 |
button_import: 가져오기 |
| 1185 | 1185 |
field_total_estimated_hours: 추정 시간 |
| 1186 |
label_api: API
|
|
| 1186 |
label_integrations: Integrations
|
|
| 1187 | 1187 |
label_total_plural: 합계 |
| 1188 | 1188 |
label_assigned_issues: 할당된 일감 |
| 1189 | 1189 |
label_field_format_enumeration: 키/값 목록 |
| config/locales/lt.yml | ||
|---|---|---|
| 973 | 973 |
label_fields_mapping: Laukų sujungimas |
| 974 | 974 |
label_file_content_preview: Failo turinio peržiūra |
| 975 | 975 |
label_create_missing_values: Sukurti trūkstamas reikšmes |
| 976 |
label_api: API
|
|
| 976 |
label_integrations: Integrations
|
|
| 977 | 977 |
label_field_format_enumeration: Raktas/reikšmė sąrašas |
| 978 | 978 |
label_default_values_for_new_users: Numatytosios reikšmės naujiems vartotojams |
| 979 | 979 | |
| config/locales/lv.yml | ||
|---|---|---|
| 1142 | 1142 |
label_create_missing_values: Create missing values |
| 1143 | 1143 |
button_import: Import |
| 1144 | 1144 |
field_total_estimated_hours: Total estimated time |
| 1145 |
label_api: API
|
|
| 1145 |
label_integrations: Integrations
|
|
| 1146 | 1146 |
label_total_plural: Totals |
| 1147 | 1147 |
label_assigned_issues: Assigned issues |
| 1148 | 1148 |
label_field_format_enumeration: Key/value list |
| config/locales/mk.yml | ||
|---|---|---|
| 1148 | 1148 |
label_create_missing_values: Create missing values |
| 1149 | 1149 |
button_import: Import |
| 1150 | 1150 |
field_total_estimated_hours: Total estimated time |
| 1151 |
label_api: API
|
|
| 1151 |
label_integrations: Integrations
|
|
| 1152 | 1152 |
label_total_plural: Totals |
| 1153 | 1153 |
label_assigned_issues: Assigned issues |
| 1154 | 1154 |
label_field_format_enumeration: Key/value list |
| config/locales/mn.yml | ||
|---|---|---|
| 1148 | 1148 |
label_create_missing_values: Create missing values |
| 1149 | 1149 |
button_import: Import |
| 1150 | 1150 |
field_total_estimated_hours: Total estimated time |
| 1151 |
label_api: API
|
|
| 1151 |
label_integrations: Integrations
|
|
| 1152 | 1152 |
label_total_plural: Нийлбэр |
| 1153 | 1153 |
label_assigned_issues: Assigned issues |
| 1154 | 1154 |
label_field_format_enumeration: Key/value list |
| config/locales/nl.yml | ||
|---|---|---|
| 1125 | 1125 |
label_create_missing_values: Ontbrekende waarden invullen |
| 1126 | 1126 |
button_import: Importeren |
| 1127 | 1127 |
field_total_estimated_hours: Geschatte totaaltijd |
| 1128 |
label_api: API
|
|
| 1128 |
label_integrations: Integrations
|
|
| 1129 | 1129 |
label_total_plural: Totalen |
| 1130 | 1130 |
label_assigned_issues: Toegewezen issues |
| 1131 | 1131 |
label_field_format_enumeration: Sleutel/waarde lijst |
| config/locales/no.yml | ||
|---|---|---|
| 1139 | 1139 |
label_create_missing_values: Create missing values |
| 1140 | 1140 |
button_import: Import |
| 1141 | 1141 |
field_total_estimated_hours: Total estimated time |
| 1142 |
label_api: API
|
|
| 1142 |
label_integrations: Integrations
|
|
| 1143 | 1143 |
label_total_plural: Totals |
| 1144 | 1144 |
label_assigned_issues: Assigned issues |
| 1145 | 1145 |
label_field_format_enumeration: Key/value list |
| config/locales/pl.yml | ||
|---|---|---|
| 1111 | 1111 |
label_relations_mapping: Mapowanie relacji |
| 1112 | 1112 |
label_file_content_preview: Podgląd treści pliku |
| 1113 | 1113 |
label_create_missing_values: Utwórz brakujące wartości |
| 1114 |
label_api: API
|
|
| 1114 |
label_integrations: Integrations
|
|
| 1115 | 1115 |
label_field_format_enumeration: "Lista klucz/wartość" |
| 1116 | 1116 |
label_default_values_for_new_users: Domyślne wartości dla nowych użytkowników |
| 1117 | 1117 |
label_relations: Relacje |
| config/locales/pt-BR.yml | ||
|---|---|---|
| 1167 | 1167 |
label_create_missing_values: Criar valores em falta |
| 1168 | 1168 |
button_import: Importar |
| 1169 | 1169 |
field_total_estimated_hours: Tempo estimado geral |
| 1170 |
label_api: API
|
|
| 1170 |
label_integrations: Integrations
|
|
| 1171 | 1171 |
label_total_plural: Totais |
| 1172 | 1172 |
label_assigned_issues: Tarefas atribuídas |
| 1173 | 1173 |
label_field_format_enumeration: Chave/Lista de valores |
| config/locales/pt.yml | ||
|---|---|---|
| 1148 | 1148 |
label_create_missing_values: Criar os valores em falta |
| 1149 | 1149 |
button_import: Importar |
| 1150 | 1150 |
field_total_estimated_hours: Total de tempo estimado |
| 1151 |
label_api: API
|
|
| 1151 |
label_integrations: Integrations
|
|
| 1152 | 1152 |
label_total_plural: Totais |
| 1153 | 1153 |
label_assigned_issues: Tarefas atribuídas |
| 1154 | 1154 |
label_field_format_enumeration: Lista chave/valor |
| config/locales/ro.yml | ||
|---|---|---|
| 1143 | 1143 |
label_create_missing_values: Create missing values |
| 1144 | 1144 |
button_import: Import |
| 1145 | 1145 |
field_total_estimated_hours: Total estimated time |
| 1146 |
label_api: API
|
|
| 1146 |
label_integrations: Integrations
|
|
| 1147 | 1147 |
label_total_plural: Totals |
| 1148 | 1148 |
label_assigned_issues: Assigned issues |
| 1149 | 1149 |
label_field_format_enumeration: Key/value list |
| config/locales/ru.yml | ||
|---|---|---|
| 1246 | 1246 |
label_create_missing_values: Создать недостающие значения |
| 1247 | 1247 |
button_import: Импорт |
| 1248 | 1248 |
field_total_estimated_hours: Общая оценка временных затрат |
| 1249 |
label_api: API
|
|
| 1249 |
label_integrations: Integrations
|
|
| 1250 | 1250 |
label_total_plural: Итоги |
| 1251 | 1251 |
label_assigned_issues: Назначенные задачи |
| 1252 | 1252 |
label_field_format_enumeration: Список ключ/значение |
| config/locales/sk.yml | ||
|---|---|---|
| 1137 | 1137 |
label_create_missing_values: Create missing values |
| 1138 | 1138 |
button_import: Import |
| 1139 | 1139 |
field_total_estimated_hours: Total estimated time |
| 1140 |
label_api: API
|
|
| 1140 |
label_integrations: Integrations
|
|
| 1141 | 1141 |
label_total_plural: Totals |
| 1142 | 1142 |
label_assigned_issues: Assigned issues |
| 1143 | 1143 |
label_field_format_enumeration: Key/value list |
| config/locales/sl.yml | ||
|---|---|---|
| 1148 | 1148 |
label_create_missing_values: Create missing values |
| 1149 | 1149 |
button_import: Import |
| 1150 | 1150 |
field_total_estimated_hours: Total estimated time |
| 1151 |
label_api: API
|
|
| 1151 |
label_integrations: Integrations
|
|
| 1152 | 1152 |
label_total_plural: Totals |
| 1153 | 1153 |
label_assigned_issues: Assigned issues |
| 1154 | 1154 |
label_field_format_enumeration: Key/value list |
| config/locales/sq.yml | ||
|---|---|---|
| 1062 | 1062 |
label_relations_mapping: Përshoqërim marrëdhëniesh |
| 1063 | 1063 |
label_file_content_preview: Paraparje lënde kartele |
| 1064 | 1064 |
label_create_missing_values: Krijo vlera që mungojnë |
| 1065 |
label_api: API
|
|
| 1065 |
label_integrations: Integrations
|
|
| 1066 | 1066 |
label_field_format_enumeration: Listë kyç/vlerë |
| 1067 | 1067 |
label_default_values_for_new_users: Vlera parazgjedhje për përdorues të rinj |
| 1068 | 1068 |
label_relations: Marrëdhënie |
| config/locales/sr-YU.yml | ||
|---|---|---|
| 1150 | 1150 |
label_create_missing_values: Create missing values |
| 1151 | 1151 |
button_import: Import |
| 1152 | 1152 |
field_total_estimated_hours: Total estimated time |
| 1153 |
label_api: API
|
|
| 1153 |
label_integrations: Integrations
|
|
| 1154 | 1154 |
label_total_plural: Totals |
| 1155 | 1155 |
label_assigned_issues: Assigned issues |
| 1156 | 1156 |
label_field_format_enumeration: Key/value list |
| config/locales/sr.yml | ||
|---|---|---|
| 1149 | 1149 |
label_create_missing_values: Create missing values |
| 1150 | 1150 |
button_import: Import |
| 1151 | 1151 |
field_total_estimated_hours: Total estimated time |
| 1152 |
label_api: API
|
|
| 1152 |
label_integrations: Integrations
|
|
| 1153 | 1153 |
label_total_plural: Totals |
| 1154 | 1154 |
label_assigned_issues: Assigned issues |
| 1155 | 1155 |
label_field_format_enumeration: Key/value list |
| config/locales/sv.yml | ||
|---|---|---|
| 1178 | 1178 |
label_create_missing_values: Skapa saknade värden |
| 1179 | 1179 |
button_import: Importera |
| 1180 | 1180 |
field_total_estimated_hours: Totalt beräknad tid |
| 1181 |
label_api: API
|
|
| 1181 |
label_integrations: Integrations
|
|
| 1182 | 1182 |
label_total_plural: Totaler |
| 1183 | 1183 |
label_assigned_issues: Tilldelade ärenden |
| 1184 | 1184 |
label_field_format_enumeration: Nyckel/värde-lista |
| config/locales/ta-IN.yml | ||
|---|---|---|
| 1153 | 1153 |
label_create_missing_values: விடுபட்ட மதிப்புகளை உருவாக்கவும் |
| 1154 | 1154 |
button_import: இறக்குமதி |
| 1155 | 1155 |
field_total_estimated_hours: மொத்த மதிப்பிடப்பட்ட நேரம் |
| 1156 |
label_api: API
|
|
| 1156 |
label_integrations: Integrations
|
|
| 1157 | 1157 |
label_total_plural: மொத்தம் |
| 1158 | 1158 |
label_assigned_issues: ஒதுக்கப்பட்ட சிக்கல்கள் |
| 1159 | 1159 |
label_field_format_enumeration: சாவி / மதிப்பு பட்டியலில் |
| config/locales/th.yml | ||
|---|---|---|
| 1144 | 1144 |
label_create_missing_values: Create missing values |
| 1145 | 1145 |
button_import: Import |
| 1146 | 1146 |
field_total_estimated_hours: Total estimated time |
| 1147 |
label_api: API
|
|
| 1147 |
label_integrations: Integrations
|
|
| 1148 | 1148 |
label_total_plural: Totals |
| 1149 | 1149 |
label_assigned_issues: Assigned issues |
| 1150 | 1150 |
label_field_format_enumeration: Key/value list |
| config/locales/tr.yml | ||
|---|---|---|
| 1155 | 1155 |
label_create_missing_values: Eşleşlmeyen alanları oluştur |
| 1156 | 1156 |
button_import: İçeri aktar |
| 1157 | 1157 |
field_total_estimated_hours: Toplam tahmini zaman |
| 1158 |
label_api: API
|
|
| 1158 |
label_integrations: Integrations
|
|
| 1159 | 1159 |
label_total_plural: Toplamlar |
| 1160 | 1160 |
label_assigned_issues: Atanan işler |
| 1161 | 1161 |
label_field_format_enumeration: Anahtar/Değer listesi |
| config/locales/uk.yml | ||
|---|---|---|
| 1149 | 1149 |
label_create_missing_values: Створити відсутні значення |
| 1150 | 1150 |
button_import: Імпорт |
| 1151 | 1151 |
field_total_estimated_hours: Всього залишилось часу |
| 1152 |
label_api: API
|
|
| 1152 |
label_integrations: Integrations
|
|
| 1153 | 1153 |
label_total_plural: Висновки |
| 1154 | 1154 |
label_assigned_issues: Призначені задачі |
| 1155 | 1155 |
label_field_format_enumeration: Ключ/значення список |
| config/locales/vi.yml | ||
|---|---|---|
| 1193 | 1193 |
label_create_missing_values: Tạo các giá trị còn thiếu |
| 1194 | 1194 |
button_import: Import |
| 1195 | 1195 |
field_total_estimated_hours: Tổng thời gian ước tính |
| 1196 |
label_api: API
|
|
| 1196 |
label_integrations: Integrations
|
|
| 1197 | 1197 |
label_total_plural: Tổng |
| 1198 | 1198 |
label_assigned_issues: Các vấn đề được giao |
| 1199 | 1199 |
label_field_format_enumeration: Danh sách khóa / giá trị |
| config/locales/zh-TW.yml | ||
|---|---|---|
| 1083 | 1083 |
label_fields_mapping: 欄位對應 |
| 1084 | 1084 |
label_file_content_preview: 檔案內容預覽 |
| 1085 | 1085 |
label_create_missing_values: 建立缺少的數值 |
| 1086 |
label_api: API
|
|
| 1086 |
label_integrations: Integrations
|
|
| 1087 | 1087 |
label_field_format_enumeration: 鍵/值 清單 |
| 1088 | 1088 |
label_default_values_for_new_users: 新用戶使用之預設值 |
| 1089 | 1089 |
label_relations: 關聯 |
| config/locales/zh.yml | ||
|---|---|---|
| 1144 | 1144 |
label_create_missing_values: 创建缺失的数值 |
| 1145 | 1145 |
button_import: 导入 |
| 1146 | 1146 |
field_total_estimated_hours: 预估工时统计 |
| 1147 |
label_api: API
|
|
| 1147 |
label_integrations: Integrations
|
|
| 1148 | 1148 |
label_total_plural: 总计 |
| 1149 | 1149 |
label_assigned_issues: 被指派的问题 |
| 1150 | 1150 |
label_field_format_enumeration: 键/值 清单 |
| config/settings.yml | ||
|---|---|---|
| 336 | 336 |
jsonp_enabled: |
| 337 | 337 |
default: 0 |
| 338 | 338 |
security_notifications: 1 |
| 339 |
webhooks_enabled: |
|
| 340 |
default: 1 |
|
| 339 | 341 |
default_notification_option: |
| 340 | 342 |
default: 'only_assigned' |
| 341 | 343 |
emails_header: |
| test/functional/my_controller_test.rb | ||
|---|---|---|
| 398 | 398 |
assert_select 'select[name=?]', 'user[language]' |
| 399 | 399 |
end |
| 400 | 400 | |
| 401 |
def test_my_account_should_toggle_webhook_link_with_setting |
|
| 402 |
User.find(2).roles.first.add_permission!(:use_webhooks) |
|
| 403 | ||
| 404 |
get :account |
|
| 405 |
assert_response :success |
|
| 406 |
assert_select 'a.icon-webhook', 1 |
|
| 407 | ||
| 408 |
with_settings webhooks_enabled: '0' do |
|
| 409 |
get :account |
|
| 410 |
assert_response :success |
|
| 411 |
assert_select 'a.icon-webhook', 0 |
|
| 412 |
end |
|
| 413 |
end |
|
| 414 | ||
| 401 | 415 |
def test_my_account_with_avatar_enabled_should_link_to_edit_avatar |
| 402 | 416 |
with_settings :gravatar_enabled => '1' do |
| 403 | 417 |
Redmine::Configuration.with 'avatar_server_url' => 'https://gravatar.com' do |
| test/functional/webhooks_controller_test.rb | ||
|---|---|---|
| 27 | 27 |
assert_select 'td', text: @other_hook.url, count: 0 |
| 28 | 28 |
end |
| 29 | 29 | |
| 30 |
test "should return not found when disabled" do |
|
| 31 |
with_settings webhooks_enabled: '0' do |
|
| 32 |
get :index |
|
| 33 |
assert_response :forbidden |
|
| 34 | ||
| 35 |
get :new |
|
| 36 |
assert_response :forbidden |
|
| 37 |
end |
|
| 38 |
end |
|
| 39 | ||
| 30 | 40 |
test "should get new" do |
| 31 | 41 |
get :new |
| 32 | 42 |
assert_response :success |
| test/unit/webhook_test.rb | ||
|---|---|---|
| 168 | 168 |
end |
| 169 | 169 |
end |
| 170 | 170 | |
| 171 |
test "enabled? should follow setting flag" do |
|
| 172 |
assert Webhook.enabled? |
|
| 173 | ||
| 174 |
with_settings webhooks_enabled: '0' do |
|
| 175 |
assert_not Webhook.enabled? |
|
| 176 |
end |
|
| 177 | ||
| 178 |
with_settings webhooks_enabled: '1' do |
|
| 179 |
assert Webhook.enabled? |
|
| 180 |
end |
|
| 181 |
end |
|
| 182 | ||
| 183 |
test "trigger should not enqueue jobs when disabled" do |
|
| 184 |
create_hook |
|
| 185 | ||
| 186 |
with_settings webhooks_enabled: '0' do |
|
| 187 |
assert_no_enqueued_jobs do |
|
| 188 |
Webhook.trigger('issue.created', @issue)
|
|
| 189 |
end |
|
| 190 |
end |
|
| 191 |
end |
|
| 192 | ||
| 171 | 193 |
test "should compute payload" do |
| 172 | 194 |
hook = create_hook |
| 173 | 195 |
payload = hook.payload('issue.created', @issue)
|
- « Previous
- 1
- …
- 9
- 10
- 11
- Next »