Feature #29664 » full patch based on 5.1-stable.patch
| Gemfile (revision f9673061812c2f08e3775f61597c44826a430ea3) → Gemfile (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
gem 'rbpdf', '~> 1.21.3'
|
||
|
gem 'addressable'
|
||
|
gem 'rubyzip', '~> 2.3.0'
|
||
|
gem 'rest-client', '~> 2.1'
|
||
|
# Ruby Standard Gems
|
||
|
gem 'csv', '~> 3.2.6'
|
||
| /dev/null (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) → app/controllers/webhooks_controller.rb (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
# frozen_string_literal: true
|
||
|
class WebhooksController < ApplicationController
|
||
|
self.main_menu = false
|
||
|
before_action :require_login
|
||
|
before_action :check_enabled
|
||
|
before_action :authorize
|
||
|
before_action :find_webhook, :only => [:edit, :update, :destroy]
|
||
|
require_sudo_mode :create, :update, :destroy
|
||
|
helper :projects
|
||
|
def index
|
||
|
@webhooks = webhooks_scope.order(:url)
|
||
|
end
|
||
|
def new
|
||
|
@webhook = User.current.webhooks.build
|
||
|
end
|
||
|
def edit
|
||
|
end
|
||
|
def create
|
||
|
@webhook = User.current.webhooks.build(webhook_params)
|
||
|
if @webhook.save
|
||
|
redirect_to webhooks_path
|
||
|
else
|
||
|
render :new
|
||
|
end
|
||
|
end
|
||
|
def update
|
||
|
if @webhook.update(webhook_params)
|
||
|
redirect_to webhooks_path
|
||
|
else
|
||
|
render :edit
|
||
|
end
|
||
|
end
|
||
|
def destroy
|
||
|
@webhook.destroy
|
||
|
redirect_to webhooks_path
|
||
|
end
|
||
|
private
|
||
|
def webhooks_scope
|
||
|
if User.current.admin?
|
||
|
Webhook.includes(:user).references(:users)
|
||
|
else
|
||
|
User.current.webhooks
|
||
|
end
|
||
|
end
|
||
|
def webhook_params
|
||
|
attrs = params.require(:webhook).permit(:url, :secret, :active, :events => [], :project_ids => [], :tracker_ids => [])
|
||
|
attrs[:events] = Array(attrs[:events]).reject(&:blank?)
|
||
|
attrs[:project_ids] = Array(attrs[:project_ids]).reject(&:blank?)
|
||
|
attrs[:tracker_ids] = Array(attrs[:tracker_ids]).reject(&:blank?)
|
||
|
attrs
|
||
|
end
|
||
|
def find_webhook
|
||
|
@webhook = webhooks_scope.find_by(:id => params[:id])
|
||
|
render_404 unless @webhook
|
||
|
end
|
||
|
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
|
||
| /dev/null (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) → app/jobs/webhook_job.rb (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
# frozen_string_literal: true
|
||
|
class WebhookJob < ApplicationJob
|
||
|
def perform(hook_id, payload_json)
|
||
|
previous_user = User.current
|
||
|
hook = Webhook.find_by(:id => hook_id)
|
||
|
return unless hook&.user&.active?
|
||
|
User.current = hook.user
|
||
|
hook.call(payload_json)
|
||
|
ensure
|
||
|
User.current = previous_user
|
||
|
end
|
||
|
end
|
||
| app/models/issue.rb (revision f9673061812c2f08e3775f61597c44826a430ea3) → app/models/issue.rb (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
# https://api.rubyonrails.org/v5.2.3/classes/ActiveSupport/Callbacks/ClassMethods.html#method-i-set_callback
|
||
|
after_create_commit :send_notification
|
||
|
after_create_commit :add_auto_watcher
|
||
|
after_create_commit -> {Webhook.trigger('issue.created', self)}
|
||
|
after_update_commit :trigger_issue_webhooks
|
||
|
after_destroy_commit -> {Webhook.trigger('issue.deleted', self)}
|
||
|
after_commit :create_parent_issue_journal
|
||
|
# Returns a SQL conditions string used to find all issues visible by the specified user
|
||
| ... | ... | |
|
end
|
||
|
end
|
||
|
def trigger_issue_webhooks
|
||
|
Webhook.trigger('issue.updated', self)
|
||
|
return unless saved_change_to_status_id?
|
||
|
previous_status = IssueStatus.find_by(:id => saved_change_to_status_id.first)
|
||
|
current_status = status
|
||
|
return unless current_status&.is_closed?
|
||
|
return if previous_status&.is_closed?
|
||
|
Webhook.trigger('issue.closed', self)
|
||
|
end
|
||
|
# Returns true if usr or current user is allowed to view the issue
|
||
|
def visible?(usr=nil)
|
||
|
(usr || User.current).allowed_to?(:view_issues, self.project) do |role, user|
|
||
| app/models/project.rb (revision f9673061812c2f08e3775f61597c44826a430ea3) → app/models/project.rb (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
has_many :queries, :dependent => :destroy
|
||
|
has_many :documents, :dependent => :destroy
|
||
|
has_many :news, lambda {includes(:author)}, :dependent => :destroy
|
||
|
has_and_belongs_to_many :webhooks
|
||
|
has_many :issue_categories, lambda {order(:name)}, :dependent => :delete_all
|
||
|
has_many :boards, lambda {order(:position)}, :inverse_of => :project, :dependent => :destroy
|
||
|
has_one :repository, lambda {where(:is_default => true)}
|
||
| app/models/user.rb (revision f9673061812c2f08e3775f61597c44826a430ea3) → app/models/user.rb (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
has_one :api_token, lambda {where "#{table.name}.action='api'"}, :class_name => 'Token'
|
||
|
has_one :email_address, lambda {where :is_default => true}, :autosave => true
|
||
|
has_many :email_addresses, :dependent => :delete_all
|
||
|
has_many :webhooks, :dependent => :destroy
|
||
|
belongs_to :auth_source
|
||
|
scope :logged, lambda {where("#{User.table_name}.status <> #{STATUS_ANONYMOUS}")}
|
||
| /dev/null (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) → app/models/webhook.rb (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
# frozen_string_literal: true
|
||
|
require 'rest-client'
|
||
|
class Webhook < ApplicationRecord
|
||
|
belongs_to :user
|
||
|
has_and_belongs_to_many :projects
|
||
|
has_and_belongs_to_many :trackers
|
||
|
serialize :events, Array
|
||
|
validates :url, :presence => true,
|
||
|
:length => {:maximum => 2000},
|
||
|
:webhook_endpoint => true
|
||
|
validates :secret, :length => {:maximum => 255}, :allow_blank => true
|
||
|
validate :validate_events
|
||
|
validate :validate_projects
|
||
|
validate :validate_trackers
|
||
|
scope :active, -> {where(:active => true)}
|
||
|
before_validation :filter_projects
|
||
|
before_validation :filter_trackers
|
||
|
after_initialize :ensure_events_array
|
||
|
def self.enabled?
|
||
|
Setting.webhooks_enabled?
|
||
|
end
|
||
|
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)
|
||
|
end
|
||
|
end
|
||
|
def self.hooks_for(event, object)
|
||
|
project = object.respond_to?(:project) ? object.project : nil
|
||
|
return [] unless project
|
||
|
active
|
||
|
.joins(:projects, :user)
|
||
|
.where(:projects => {:id => project.id})
|
||
|
.where(:users => {:status => User::STATUS_ACTIVE})
|
||
|
.select do |hook|
|
||
|
hook.events.include?(event) &&
|
||
|
(!object.respond_to?(:visible?) || object.visible?(hook.user)) &&
|
||
|
hook.user.allowed_to?(:use_webhooks, project) &&
|
||
|
hook.tracker_allowed?(object)
|
||
|
end
|
||
|
end
|
||
|
def setable_projects
|
||
|
member = user || User.current
|
||
|
return Project.none unless member
|
||
|
Project.allowed_to(member, :use_webhooks).sorted
|
||
|
end
|
||
|
def setable_events
|
||
|
WebhookPayload::EVENTS
|
||
|
end
|
||
|
def setable_event_names
|
||
|
setable_events.flat_map {|type, actions| actions.map {|action| "#{type}.#{action}"}}
|
||
|
end
|
||
|
def setable_trackers
|
||
|
project_trackers = setable_projects.includes(:trackers).flat_map(&:trackers)
|
||
|
project_trackers.uniq.sort_by(&:position)
|
||
|
end
|
||
|
def payload(event, object)
|
||
|
WebhookPayload.new(event, object, user).to_h
|
||
|
end
|
||
|
def call(payload_json)
|
||
|
Executor.new(url, payload_json, secret).call
|
||
|
true
|
||
|
rescue => e
|
||
|
Rails.logger.warn do
|
||
|
"Webhook delivery failed: #{e.class}: #{e.message}\n#{Array(e.backtrace).join("\n")}"
|
||
|
end
|
||
|
false
|
||
|
end
|
||
|
class Executor
|
||
|
def initialize(url, payload, secret)
|
||
|
@url = url
|
||
|
@payload = payload
|
||
|
@secret = secret
|
||
|
end
|
||
|
def call
|
||
|
raise URI::BadURIError unless WebhookEndpointValidator.safe_webhook_uri?(@url)
|
||
|
headers = {
|
||
|
:accept => '*/*',
|
||
|
:content_type => :json,
|
||
|
:user_agent => 'Redmine'
|
||
|
}
|
||
|
headers['X-Redmine-Signature-256'] = compute_signature if @secret.present?
|
||
|
Rails.logger.debug {"Webhook: POST #{@url}"}
|
||
|
RestClient.post(@url, @payload, headers)
|
||
|
end
|
||
|
private
|
||
|
def compute_signature
|
||
|
'sha256=' + OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), @secret, @payload)
|
||
|
end
|
||
|
end
|
||
|
def tracker_allowed?(object)
|
||
|
return true unless object.respond_to?(:tracker_id)
|
||
|
tracker_ids.blank? || tracker_ids.include?(object.tracker_id)
|
||
|
end
|
||
|
private
|
||
|
def ensure_events_array
|
||
|
self.events ||= []
|
||
|
end
|
||
|
def filter_projects
|
||
|
return if project_ids.blank?
|
||
|
allowed_ids = setable_projects.map(&:id)
|
||
|
self.project_ids = project_ids & allowed_ids
|
||
|
end
|
||
|
def filter_trackers
|
||
|
return if tracker_ids.blank?
|
||
|
allowed_ids = setable_trackers.map(&:id)
|
||
|
self.tracker_ids = tracker_ids & allowed_ids
|
||
|
end
|
||
|
def validate_events
|
||
|
self.events = Array(events).reject(&:blank?)
|
||
|
if events.blank? || (events - setable_event_names).any?
|
||
|
errors.add(:events, :invalid)
|
||
|
end
|
||
|
end
|
||
|
def validate_projects
|
||
|
if project_ids.blank?
|
||
|
errors.add(:projects, :blank)
|
||
|
end
|
||
|
end
|
||
|
def validate_trackers
|
||
|
self.tracker_ids = tracker_ids & setable_trackers.map(&:id)
|
||
|
if issue_events_selected? && tracker_ids.blank?
|
||
|
errors.add(:trackers, :blank)
|
||
|
end
|
||
|
end
|
||
|
def issue_events_selected?
|
||
|
Array(events).any? {|event| event.to_s.start_with?('issue.')}
|
||
|
end
|
||
|
end
|
||
| /dev/null (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) → app/models/webhook_payload.rb (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
# frozen_string_literal: true
|
||
|
class WebhookPayload
|
||
|
EVENTS = {
|
||
|
:issue => %w[created updated closed deleted],
|
||
|
:wiki_page => %w[created updated deleted]
|
||
|
}.freeze
|
||
|
attr_reader :event, :object, :user
|
||
|
def initialize(event, object, user)
|
||
|
@event = event
|
||
|
@object = object
|
||
|
@user = user
|
||
|
end
|
||
|
def to_h
|
||
|
type, action = event.split('.')
|
||
|
type = type&.to_sym
|
||
|
unless EVENTS[type]&.include?(action)
|
||
|
raise ArgumentError, "Unsupported webhook event: #{event}"
|
||
|
end
|
||
|
payload, timestamp = send("#{type}_payload", action)
|
||
|
timestamp ||= Time.current
|
||
|
{
|
||
|
:type => event,
|
||
|
:timestamp => timestamp.utc.iso8601,
|
||
|
:data => payload
|
||
|
}
|
||
|
end
|
||
|
private
|
||
|
def issue_payload(action)
|
||
|
issue = object
|
||
|
journal = %w[updated closed].include?(action) ? issue.current_journal : nil
|
||
|
payload = {
|
||
|
:issue => issue_hash(issue)
|
||
|
}
|
||
|
payload[:journal] = journal_hash(journal) if journal
|
||
|
timestamp =
|
||
|
case action
|
||
|
when 'created'
|
||
|
issue.created_on
|
||
|
when 'closed'
|
||
|
issue.closed_on || Time.current
|
||
|
when 'deleted'
|
||
|
Time.current
|
||
|
else
|
||
|
journal&.created_on || issue.updated_on
|
||
|
end
|
||
|
[payload, timestamp]
|
||
|
end
|
||
|
def wiki_page_payload(action)
|
||
|
page, content = wiki_page_and_content
|
||
|
payload = {
|
||
|
:wiki_page => wiki_page_hash(page)
|
||
|
}
|
||
|
payload[:content] = wiki_content_hash(content) if content
|
||
|
timestamp =
|
||
|
case action
|
||
|
when 'created'
|
||
|
content&.created_on || Time.current
|
||
|
when 'deleted'
|
||
|
Time.current
|
||
|
else
|
||
|
content&.updated_on || Time.current
|
||
|
end
|
||
|
[payload, timestamp]
|
||
|
end
|
||
|
def issue_hash(issue)
|
||
|
hash = {
|
||
|
:id => issue.id,
|
||
|
:subject => issue.subject,
|
||
|
:description => issue.description,
|
||
|
:is_private => issue.is_private?,
|
||
|
:project => project_hash(issue.project),
|
||
|
:tracker => reference_hash(issue.tracker),
|
||
|
:status => status_hash(issue.status),
|
||
|
:priority => reference_hash(issue.priority),
|
||
|
:author => user_hash(issue.author),
|
||
|
:assigned_to => user_hash(issue.assigned_to),
|
||
|
:category => reference_hash(issue.category),
|
||
|
:fixed_version => reference_hash(issue.fixed_version),
|
||
|
:parent => issue.parent_id ? {:id => issue.parent_id} : nil,
|
||
|
:start_date => issue.start_date&.to_s,
|
||
|
:due_date => issue.due_date&.to_s,
|
||
|
:done_ratio => issue.done_ratio,
|
||
|
:estimated_hours => issue.estimated_hours,
|
||
|
:total_estimated_hours => issue.total_estimated_hours,
|
||
|
:created_on => issue.created_on&.iso8601,
|
||
|
:updated_on => issue.updated_on&.iso8601,
|
||
|
:closed_on => issue.closed_on&.iso8601
|
||
|
}
|
||
|
if user&.allowed_to?(:view_time_entries, issue.project)
|
||
|
hash[:spent_hours] = issue.spent_hours
|
||
|
hash[:total_spent_hours] = issue.total_spent_hours
|
||
|
end
|
||
|
custom_fields = issue.visible_custom_field_values(user).map do |value|
|
||
|
{
|
||
|
:id => value.custom_field_id,
|
||
|
:name => value.custom_field.name,
|
||
|
:value => value.value
|
||
|
}
|
||
|
end
|
||
|
hash[:custom_fields] = custom_fields if custom_fields.any?
|
||
|
hash.compact
|
||
|
end
|
||
|
def journal_hash(journal)
|
||
|
return unless journal
|
||
|
{
|
||
|
:id => journal.id,
|
||
|
:notes => journal.notes,
|
||
|
:created_on => journal.created_on&.iso8601,
|
||
|
:user => user_hash(journal.user),
|
||
|
:details => journal.visible_details(user).map do |detail|
|
||
|
{
|
||
|
:property => detail.property,
|
||
|
:prop_key => detail.prop_key,
|
||
|
:old_value => detail.old_value,
|
||
|
:value => detail.value
|
||
|
}
|
||
|
end
|
||
|
}
|
||
|
end
|
||
|
def wiki_page_hash(page)
|
||
|
return {} unless page
|
||
|
{
|
||
|
:id => page.id,
|
||
|
:title => page.title,
|
||
|
:project => project_hash(page.project),
|
||
|
:parent_id => page.parent_id,
|
||
|
:created_on => page.created_on&.iso8601,
|
||
|
:updated_on => page.updated_on&.iso8601
|
||
|
}.compact
|
||
|
end
|
||
|
def wiki_content_hash(content)
|
||
|
return unless content
|
||
|
{
|
||
|
:version => content.version,
|
||
|
:text => content.text,
|
||
|
:comments => content.comments,
|
||
|
:author => user_hash(content.author),
|
||
|
:created_on => content.created_on&.iso8601,
|
||
|
:updated_on => content.updated_on&.iso8601
|
||
|
}
|
||
|
end
|
||
|
def wiki_page_and_content
|
||
|
if object.is_a?(WikiContent)
|
||
|
[object.page, object]
|
||
|
else
|
||
|
[object, object.respond_to?(:content) ? object.content : nil]
|
||
|
end
|
||
|
end
|
||
|
def project_hash(project)
|
||
|
return unless project
|
||
|
{
|
||
|
:id => project.id,
|
||
|
:identifier => project.identifier,
|
||
|
:name => project.name
|
||
|
}
|
||
|
end
|
||
|
def reference_hash(record)
|
||
|
return unless record
|
||
|
{:id => record.id, :name => record.name}
|
||
|
end
|
||
|
def status_hash(status)
|
||
|
return unless status
|
||
|
{:id => status.id, :name => status.name, :is_closed => status.is_closed?}
|
||
|
end
|
||
|
def user_hash(user_record)
|
||
|
return unless user_record
|
||
|
{:id => user_record.id, :name => user_record.name}
|
||
|
end
|
||
|
end
|
||
| app/models/wiki_content.rb (revision f9673061812c2f08e3775f61597c44826a430ea3) → app/models/wiki_content.rb (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
after_save :create_version
|
||
|
after_create_commit :send_notification_create
|
||
|
after_update_commit :send_notification_update
|
||
|
after_create_commit :trigger_webhook_create
|
||
|
after_update_commit :trigger_webhook_update
|
||
|
scope :without_text, lambda {select(:id, :page_id, :version, :updated_on)}
|
||
| ... | ... | |
|
Mailer.deliver_wiki_content_updated(self)
|
||
|
end
|
||
|
end
|
||
|
def trigger_webhook_create
|
||
|
Webhook.trigger('wiki_page.created', self)
|
||
|
end
|
||
|
def trigger_webhook_update
|
||
|
Webhook.trigger('wiki_page.updated', self)
|
||
|
end
|
||
|
end
|
||
| app/models/wiki_page.rb (revision f9673061812c2f08e3775f61597c44826a430ea3) → app/models/wiki_page.rb (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
before_destroy :delete_redirects
|
||
|
before_save :handle_rename_or_move, :update_wiki_start_page
|
||
|
after_save :handle_children_move, :delete_selected_attachments
|
||
|
after_destroy_commit -> {Webhook.trigger('wiki_page.deleted', self)}
|
||
|
# eager load information about last updates, without loading text
|
||
|
scope :with_updated_on, lambda {preload(:content_without_text)}
|
||
| /dev/null (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) → app/validators/webhook_endpoint_validator.rb (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
# frozen_string_literal: true
|
||
|
require 'set'
|
||
|
require 'uri'
|
||
|
require 'resolv'
|
||
|
require 'ipaddr'
|
||
|
class WebhookEndpointValidator < ActiveModel::EachValidator
|
||
|
BAD_PORTS = Set[25, 111, 135, 139, 445, 1433, 1521, 2049, 3306, 3389, 5985, 5986].freeze
|
||
|
def validate_each(record, attribute, value)
|
||
|
return if value.blank?
|
||
|
valid, reason = self.class.validate_uri(value)
|
||
|
record.errors.add(attribute, :invalid, message: reason && " (#{reason})") unless valid
|
||
|
end
|
||
|
class << self
|
||
|
def safe_webhook_uri?(value)
|
||
|
valid, = validate_uri(value)
|
||
|
valid
|
||
|
end
|
||
|
def validate_uri(value)
|
||
|
uri = value.is_a?(URI) ? value : URI.parse(value.to_s)
|
||
|
return [false, 'must use http or https'] unless valid_scheme?(uri.scheme)
|
||
|
host_reason = host_validation_error(uri.host)
|
||
|
return [false, host_reason] if host_reason
|
||
|
return [false, 'uses a disallowed port'] unless valid_port?(uri.port)
|
||
|
[true, nil]
|
||
|
rescue URI::Error, ArgumentError => e
|
||
|
Rails.logger.warn {"Webhook endpoint rejected: #{value.inspect} (#{e.message})"}
|
||
|
[false, e.message]
|
||
|
end
|
||
|
def valid_scheme?(scheme)
|
||
|
%w[http https].include?(scheme)
|
||
|
end
|
||
|
def host_validation_error(host)
|
||
|
return 'host is missing' if host.blank?
|
||
|
blocked = blocked_targets
|
||
|
allowed = allowed_targets
|
||
|
host_allowlisted = allowed[:host_pattern]&.match?(host)
|
||
|
return 'host is blocklisted' if host_blocked?(host, blocked)
|
||
|
if !allowlist_empty?(allowed) && !host_allowlisted && !allowlist_ip_allowed_for_host?(host, allowed)
|
||
|
return "host is not on the allowlist"
|
||
|
end
|
||
|
addresses = ip_literal?(host) ? [host] : resolve_addresses(host)
|
||
|
return nil if addresses.blank? && allowlist_empty?(allowed)
|
||
|
addresses.each do |ip|
|
||
|
ipaddr = IPAddr.new(ip)
|
||
|
allowlisted_ip = host_allowlisted || allowlist_ip_allowed?(ipaddr, allowed)
|
||
|
return "address #{ipaddr} is blocklisted" if blocked[:ips].any? {|entry| entry.include?(ipaddr)}
|
||
|
return "address #{ipaddr} is not on the allowlist" if !allowlist_empty?(allowed) && !allowlisted_ip
|
||
|
return "address #{ipaddr} is not reachable from the public network" if !allowlisted_ip && (ipaddr.loopback? || ipaddr.link_local? || ipaddr.private?)
|
||
|
rescue IPAddr::Error
|
||
|
return "address #{ip.inspect} is invalid"
|
||
|
end
|
||
|
nil
|
||
|
end
|
||
|
def valid_port?(port)
|
||
|
port.present? && !BAD_PORTS.include?(port)
|
||
|
end
|
||
|
def resolve_addresses(host)
|
||
|
addresses = []
|
||
|
Resolv.each_address(host) {|ip| addresses << ip}
|
||
|
addresses
|
||
|
rescue Resolv::ResolvError
|
||
|
[]
|
||
|
end
|
||
|
def ip_literal?(host)
|
||
|
IPAddr.new(host)
|
||
|
true
|
||
|
rescue IPAddr::Error
|
||
|
false
|
||
|
end
|
||
|
def blocked_targets
|
||
|
@blocked_targets ||= begin
|
||
|
ips = []
|
||
|
host_patterns = []
|
||
|
Array(Redmine::Configuration['webhook_blocklist']).each do |entry|
|
||
|
entry = entry.to_s.strip
|
||
|
next if entry.empty?
|
||
|
begin
|
||
|
ips << IPAddr.new(entry)
|
||
|
rescue IPAddr::Error
|
||
|
host_patterns << entry
|
||
|
end
|
||
|
end
|
||
|
{
|
||
|
:ips => ips.freeze,
|
||
|
:host_pattern => build_host_pattern(host_patterns)
|
||
|
}
|
||
|
end
|
||
|
end
|
||
|
def allowed_targets
|
||
|
@allowed_targets ||= begin
|
||
|
ips = []
|
||
|
host_patterns = []
|
||
|
Array(Redmine::Configuration['webhook_allowlist']).each do |entry|
|
||
|
entry = entry.to_s.strip
|
||
|
next if entry.empty?
|
||
|
begin
|
||
|
ips << IPAddr.new(entry)
|
||
|
rescue IPAddr::Error
|
||
|
host_patterns << entry
|
||
|
end
|
||
|
end
|
||
|
{
|
||
|
:ips => ips.freeze,
|
||
|
:host_pattern => build_host_pattern(host_patterns)
|
||
|
}
|
||
|
end
|
||
|
end
|
||
|
def build_host_pattern(patterns)
|
||
|
return if patterns.empty?
|
||
|
sources = patterns.map do |value|
|
||
|
if value.start_with?('*.')
|
||
|
"(?:.*\\.)?#{Regexp.escape(value.delete_prefix('*.'))}"
|
||
|
else
|
||
|
Regexp.escape(value)
|
||
|
end
|
||
|
end
|
||
|
Regexp.new("\\A(?:#{sources.join('|')})\\z", Regexp::IGNORECASE)
|
||
|
end
|
||
|
def host_blocked?(host, blocked)
|
||
|
blocked[:host_pattern]&.match?(host)
|
||
|
end
|
||
|
def host_allowed_by_allowlist?(host, allowed)
|
||
|
return true if allowlist_empty?(allowed)
|
||
|
allowed[:host_pattern]&.match?(host) || allowlist_ip_allowed_for_host?(host, allowed)
|
||
|
end
|
||
|
def allowlist_empty?(allowed)
|
||
|
allowed[:ips].empty? && allowed[:host_pattern].nil?
|
||
|
end
|
||
|
def allowlist_ip_allowed_for_host?(host, allowed)
|
||
|
addresses = ip_literal?(host) ? [host] : resolve_addresses(host)
|
||
|
return false if addresses.empty?
|
||
|
addresses.any? do |ip|
|
||
|
allowlist_ip_allowed?(IPAddr.new(ip), allowed)
|
||
|
rescue IPAddr::Error
|
||
|
false
|
||
|
end
|
||
|
end
|
||
|
def allowlist_ip_allowed?(ipaddr, allowed)
|
||
|
allowed[:ips].any? {|entry| entry.include?(ipaddr)}
|
||
|
end
|
||
|
end
|
||
|
end
|
||
| app/views/my/_sidebar.html.erb (revision f9673061812c2f08e3775f61597c44826a430ea3) → app/views/my/_sidebar.html.erb (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
<% else %>
|
||
|
<%= l(:label_missing_api_access_key) %>
|
||
|
<% end %>
|
||
|
<% if Setting.webhooks_enabled? && User.current.allowed_to?(:use_webhooks, nil, :global => true) %>
|
||
|
<h4><%= l(:label_integrations) %></h4>
|
||
|
<p><%= link_to l(:label_webhook_plural), webhooks_path, :class => 'icon icon-link' %></p>
|
||
|
<% end %>
|
||
|
(<%= link_to l(:button_reset), my_api_key_path, :method => :post %>)
|
||
|
</p>
|
||
|
<% end %>
|
||
| app/views/settings/_api.html.erb (revision f9673061812c2f08e3775f61597c44826a430ea3) → app/views/settings/_api.html.erb (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
<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) %>
|
||
| /dev/null (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) → app/views/webhooks/_form.html.erb (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
<%= error_messages_for @webhook %>
|
||
|
<div class="splitcontent">
|
||
|
<div class="splitcontentleft">
|
||
|
<div class="box tabular">
|
||
|
<p>
|
||
|
<%= f.text_field :url, :required => true, :size => 60 %>
|
||
|
<em class="info"><%= l(:webhook_url_info) %></em>
|
||
|
</p>
|
||
|
<p>
|
||
|
<%= f.text_field :secret %>
|
||
|
<em class="info"><%= raw l(:webhook_secret_info_html) %></em>
|
||
|
</p>
|
||
|
<p>
|
||
|
<%= f.check_box :active %> <%= l(:field_active) %>
|
||
|
</p>
|
||
|
</div>
|
||
|
<h3><%= l(:label_webhook_events) %></h3>
|
||
|
<div class="box tabular" id="events">
|
||
|
<% @webhook.setable_events.keys.sort.each do |type| %>
|
||
|
<fieldset id="<%= type %>_events">
|
||
|
<legend>
|
||
|
<%= toggle_checkboxes_link("##{type}_events input") %>
|
||
|
<%= l_or_humanize(type, :prefix => 'webhook_events_') %>
|
||
|
</legend>
|
||
|
<% @webhook.setable_events[type].each do |action| %>
|
||
|
<% name = "#{type}.#{action}" %>
|
||
|
<label class="floating">
|
||
|
<%= check_box_tag 'webhook[events][]', name, @webhook.events.include?(name), :id => "webhook_events_#{name.tr('.', '_')}" %>
|
||
|
<%= l_or_humanize("#{type}_#{action}", :prefix => 'webhook_events_') %>
|
||
|
</label>
|
||
|
<% end %>
|
||
|
</fieldset>
|
||
|
<% end %>
|
||
|
<br /><%= check_all_links 'events' %>
|
||
|
<%= hidden_field_tag 'webhook[events][]', '' %>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="splitcontentright">
|
||
|
<fieldset class="box" id="webhook_project_ids">
|
||
|
<legend>
|
||
|
<%= toggle_checkboxes_link("#webhook_project_ids input[type=checkbox]") %>
|
||
|
<%= l(:label_project_plural) %>
|
||
|
</legend>
|
||
|
<% project_ids = @webhook.project_ids || [] %>
|
||
|
<%= render_project_nested_lists(@webhook.setable_projects) do |p| %>
|
||
|
<%= content_tag('label', check_box_tag('webhook[project_ids][]', p.id, project_ids.include?(p.id)) + ' ' + h(p)) %>
|
||
|
<% end %>
|
||
|
<%= hidden_field_tag 'webhook[project_ids][]', '' %>
|
||
|
</fieldset>
|
||
|
<fieldset class="box" id="webhook_tracker_ids">
|
||
|
<legend>
|
||
|
<%= toggle_checkboxes_link("#webhook_tracker_ids input[type=checkbox]") %>
|
||
|
<%= l(:label_tracker_plural) %>
|
||
|
</legend>
|
||
|
<% tracker_ids = @webhook.tracker_ids || [] %>
|
||
|
<% @webhook.setable_trackers.each do |tracker| %>
|
||
|
<label class="floating">
|
||
|
<%= check_box_tag('webhook[tracker_ids][]', tracker.id, tracker_ids.include?(tracker.id)) %>
|
||
|
<%= h(tracker.name) %>
|
||
|
</label>
|
||
|
<% end %>
|
||
|
<%= hidden_field_tag 'webhook[tracker_ids][]', '' %>
|
||
|
</fieldset>
|
||
|
</div>
|
||
|
</div>
|
||
| /dev/null (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) → app/views/webhooks/edit.html.erb (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
<%= labelled_form_for @webhook, :url => webhook_path(@webhook), :html => {:method => :patch} do |f| %>
|
||
|
<%= render :partial => 'form', :locals => {:f => f} %>
|
||
|
<p><%= submit_tag l(:button_save) %></p>
|
||
|
<% end %>
|
||
| /dev/null (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) → app/views/webhooks/index.html.erb (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
<div class="contextual">
|
||
|
<%= link_to l(:label_webhook_new), new_webhook_path, :class => 'icon icon-add' %>
|
||
|
</div>
|
||
|
<%= title l(:label_webhook_plural) %>
|
||
|
<% if @webhooks.any? %>
|
||
|
<div class="autoscroll">
|
||
|
<table class="list">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<% if User.current.admin? %>
|
||
|
<th><%= l(:label_user) %></th>
|
||
|
<% end %>
|
||
|
<th><%= l(:field_active) %></th>
|
||
|
<th><%= l(:field_url) %></th>
|
||
|
<th><%= l(:label_webhook_events) %></th>
|
||
|
<th><%= l(:label_project_plural) %></th>
|
||
|
<th></th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
<% @webhooks.each do |hook| %>
|
||
|
<tr id="webhook_<%= hook.id %>" class="<%= cycle('odd', 'even') %>">
|
||
|
<% if User.current.admin? %>
|
||
|
<td class="username"><%= h hook.user %></td>
|
||
|
<% end %>
|
||
|
<td><%= hook.active? ? l(:general_text_Yes) : l(:general_text_No) %></td>
|
||
|
<td><%= truncate(hook.url, :length => 50) %></td>
|
||
|
<td><%= safe_join(hook.events.map {|e| content_tag(:code, e)}, ', ') %></td>
|
||
|
<td><%= safe_join(hook.projects.visible.map {|p| link_to_project(p)}, ', ') %></td>
|
||
|
<td class="buttons">
|
||
|
<%= link_to l(:button_edit), edit_webhook_path(hook), :class => 'icon icon-edit' %>
|
||
|
<%= link_to l(:button_delete), webhook_path(hook), :method => :delete, :data => {:confirm => l(:text_are_you_sure)}, :class => 'icon icon-del' %>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<% end %>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
<% else %>
|
||
|
<p class="nodata"><%= l(:label_no_data) %></p>
|
||
|
<% end %>
|
||
| /dev/null (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) → app/views/webhooks/new.html.erb (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
<%= labelled_form_for @webhook, :url => webhooks_path do |f| %>
|
||
|
<%= render :partial => 'form', :locals => {:f => f} %>
|
||
|
<p><%= submit_tag l(:button_create) %></p>
|
||
|
<% end %>
|
||
| config/locales/ar.yml (revision f9673061812c2f08e3775f61597c44826a430ea3) → config/locales/ar.yml (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
text_default_active_job_queue_changed: Default queue adapter which is well suited
|
||
|
only for dev/test changed
|
||
|
twofa_already_setup: Two-factor authentication already set up
|
||
|
label_webhook_plural: "Webhooks"
|
||
|
label_webhook_new: "New webhook"
|
||
|
label_webhook_edit: "Edit webhook"
|
||
|
label_webhook_events: "Events"
|
||
|
webhook_events_issue: "Issues"
|
||
|
webhook_events_issue_created: "Issue created"
|
||
|
webhook_events_issue_updated: "Issue updated"
|
||
|
webhook_events_issue_closed: "Issue closed"
|
||
|
webhook_events_issue_deleted: "Issue deleted"
|
||
|
webhook_events_wiki_page: "Wiki pages"
|
||
|
webhook_events_wiki_page_created: "Wiki page created"
|
||
|
webhook_events_wiki_page_updated: "Wiki page updated"
|
||
|
webhook_events_wiki_page_deleted: "Wiki page deleted"
|
||
|
webhook_url_info: "Redmine will send a POST request to this URL when one of the selected events in one of the selected projects occurs."
|
||
|
webhook_secret_info_html: "If set, Redmine will include an HMAC signature in the <code>X-Redmine-Signature-256</code> header."
|
||
|
permission_use_webhooks: "Use webhooks"
|
||
|
setting_webhooks_enabled: "Enable webhooks"
|
||
|
label_integrations: "Integrations"
|
||
| config/locales/az.yml (revision f9673061812c2f08e3775f61597c44826a430ea3) → config/locales/az.yml (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
text_default_active_job_queue_changed: Default queue adapter which is well suited
|
||
|
only for dev/test changed
|
||
|
twofa_already_setup: Two-factor authentication already set up
|
||
|
label_webhook_plural: "Webhooks"
|
||
|
label_webhook_new: "New webhook"
|
||
|
label_webhook_edit: "Edit webhook"
|
||
|
label_webhook_events: "Events"
|
||
|
webhook_events_issue: "Issues"
|
||
|
webhook_events_issue_created: "Issue created"
|
||
|
webhook_events_issue_updated: "Issue updated"
|
||
|
webhook_events_issue_closed: "Issue closed"
|
||
|
webhook_events_issue_deleted: "Issue deleted"
|
||
|
webhook_events_wiki_page: "Wiki pages"
|
||
|
webhook_events_wiki_page_created: "Wiki page created"
|
||
|
webhook_events_wiki_page_updated: "Wiki page updated"
|
||
|
webhook_events_wiki_page_deleted: "Wiki page deleted"
|
||
|
webhook_url_info: "Redmine will send a POST request to this URL when one of the selected events in one of the selected projects occurs."
|
||
|
webhook_secret_info_html: "If set, Redmine will include an HMAC signature in the <code>X-Redmine-Signature-256</code> header."
|
||
|
permission_use_webhooks: "Use webhooks"
|
||
|
setting_webhooks_enabled: "Enable webhooks"
|
||
|
label_integrations: "Integrations"
|
||
| config/locales/bg.yml (revision f9673061812c2f08e3775f61597c44826a430ea3) → config/locales/bg.yml (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
text_project_destroy_enter_identifier: За да потвърдите действието, въведете идентификатора на проекта (%{identifier}) по-долу.
|
||
|
field_name_or_email_or_login: Име, e-mail или login име
|
||
|
twofa_already_setup: Two-factor authentication already set up
|
||
|
label_webhook_plural: "Webhooks"
|
||
|
label_webhook_new: "New webhook"
|
||
|
label_webhook_edit: "Edit webhook"
|
||
|
label_webhook_events: "Events"
|
||
|
webhook_events_issue: "Issues"
|
||
|
webhook_events_issue_created: "Issue created"
|
||
|
webhook_events_issue_updated: "Issue updated"
|
||
|
webhook_events_issue_closed: "Issue closed"
|
||
|
webhook_events_issue_deleted: "Issue deleted"
|
||
|
webhook_events_wiki_page: "Wiki pages"
|
||
|
webhook_events_wiki_page_created: "Wiki page created"
|
||
|
webhook_events_wiki_page_updated: "Wiki page updated"
|
||
|
webhook_events_wiki_page_deleted: "Wiki page deleted"
|
||
|
webhook_url_info: "Redmine will send a POST request to this URL when one of the selected events in one of the selected projects occurs."
|
||
|
webhook_secret_info_html: "If set, Redmine will include an HMAC signature in the <code>X-Redmine-Signature-256</code> header."
|
||
|
permission_use_webhooks: "Use webhooks"
|
||
|
setting_webhooks_enabled: "Enable webhooks"
|
||
|
label_integrations: "Integrations"
|
||
| config/locales/bs.yml (revision f9673061812c2f08e3775f61597c44826a430ea3) → config/locales/bs.yml (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
text_default_active_job_queue_changed: Default queue adapter which is well suited
|
||
|
only for dev/test changed
|
||
|
twofa_already_setup: Two-factor authentication already set up
|
||
|
label_webhook_plural: "Webhooks"
|
||
|
label_webhook_new: "New webhook"
|
||
|
label_webhook_edit: "Edit webhook"
|
||
|
label_webhook_events: "Events"
|
||
|
webhook_events_issue: "Issues"
|
||
|
webhook_events_issue_created: "Issue created"
|
||
|
webhook_events_issue_updated: "Issue updated"
|
||
|
webhook_events_issue_closed: "Issue closed"
|
||
|
webhook_events_issue_deleted: "Issue deleted"
|
||
|
webhook_events_wiki_page: "Wiki pages"
|
||
|
webhook_events_wiki_page_created: "Wiki page created"
|
||
|
webhook_events_wiki_page_updated: "Wiki page updated"
|
||
|
webhook_events_wiki_page_deleted: "Wiki page deleted"
|
||
|
webhook_url_info: "Redmine will send a POST request to this URL when one of the selected events in one of the selected projects occurs."
|
||
|
webhook_secret_info_html: "If set, Redmine will include an HMAC signature in the <code>X-Redmine-Signature-256</code> header."
|
||
|
permission_use_webhooks: "Use webhooks"
|
||
|
setting_webhooks_enabled: "Enable webhooks"
|
||
|
label_integrations: "Integrations"
|
||
| config/locales/ca.yml (revision f9673061812c2f08e3775f61597c44826a430ea3) → config/locales/ca.yml (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
text_select_apply_issue_status: Marca l'estat de la incidència
|
||
|
field_name_or_email_or_login: Nom, correu o login
|
||
|
twofa_already_setup: Two-factor authentication already set up
|
||
|
label_webhook_plural: "Webhooks"
|
||
|
label_webhook_new: "New webhook"
|
||
|
label_webhook_edit: "Edit webhook"
|
||
|
label_webhook_events: "Events"
|
||
|
webhook_events_issue: "Issues"
|
||
|
webhook_events_issue_created: "Issue created"
|
||
|
webhook_events_issue_updated: "Issue updated"
|
||
|
webhook_events_issue_closed: "Issue closed"
|
||
|
webhook_events_issue_deleted: "Issue deleted"
|
||
|
webhook_events_wiki_page: "Wiki pages"
|
||
|
webhook_events_wiki_page_created: "Wiki page created"
|
||
|
webhook_events_wiki_page_updated: "Wiki page updated"
|
||
|
webhook_events_wiki_page_deleted: "Wiki page deleted"
|
||
|
webhook_url_info: "Redmine will send a POST request to this URL when one of the selected events in one of the selected projects occurs."
|
||
|
webhook_secret_info_html: "If set, Redmine will include an HMAC signature in the <code>X-Redmine-Signature-256</code> header."
|
||
|
permission_use_webhooks: "Use webhooks"
|
||
|
setting_webhooks_enabled: "Enable webhooks"
|
||
|
label_integrations: "Integrations"
|
||
| config/locales/cs.yml (revision f9673061812c2f08e3775f61597c44826a430ea3) → config/locales/cs.yml (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
text_default_active_job_queue_changed: Výchozí adaptér fronty, vhodný pouze pro
|
||
|
vývoj/testování, byl změněn
|
||
|
twofa_already_setup: Two-factor authentication already set up
|
||
|
label_webhook_plural: "Webhooks"
|
||
|
label_webhook_new: "New webhook"
|
||
|
label_webhook_edit: "Edit webhook"
|
||
|
label_webhook_events: "Events"
|
||
|
webhook_events_issue: "Issues"
|
||
|
webhook_events_issue_created: "Issue created"
|
||
|
webhook_events_issue_updated: "Issue updated"
|
||
|
webhook_events_issue_closed: "Issue closed"
|
||
|
webhook_events_issue_deleted: "Issue deleted"
|
||
|
webhook_events_wiki_page: "Wiki pages"
|
||
|
webhook_events_wiki_page_created: "Wiki page created"
|
||
|
webhook_events_wiki_page_updated: "Wiki page updated"
|
||
|
webhook_events_wiki_page_deleted: "Wiki page deleted"
|
||
|
webhook_url_info: "Redmine will send a POST request to this URL when one of the selected events in one of the selected projects occurs."
|
||
|
webhook_secret_info_html: "If set, Redmine will include an HMAC signature in the <code>X-Redmine-Signature-256</code> header."
|
||
|
permission_use_webhooks: "Use webhooks"
|
||
|
setting_webhooks_enabled: "Enable webhooks"
|
||
|
label_integrations: "Integrations"
|
||
| config/locales/da.yml (revision f9673061812c2f08e3775f61597c44826a430ea3) → config/locales/da.yml (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
text_default_active_job_queue_changed: Default queue adapter which is well suited
|
||
|
only for dev/test changed
|
||
|
twofa_already_setup: Two-factor authentication already set up
|
||
|
label_webhook_plural: "Webhooks"
|
||
|
label_webhook_new: "New webhook"
|
||
|
label_webhook_edit: "Edit webhook"
|
||
|
label_webhook_events: "Events"
|
||
|
webhook_events_issue: "Issues"
|
||
|
webhook_events_issue_created: "Issue created"
|
||
|
webhook_events_issue_updated: "Issue updated"
|
||
|
webhook_events_issue_closed: "Issue closed"
|
||
|
webhook_events_issue_deleted: "Issue deleted"
|
||
|
webhook_events_wiki_page: "Wiki pages"
|
||
|
webhook_events_wiki_page_created: "Wiki page created"
|
||
|
webhook_events_wiki_page_updated: "Wiki page updated"
|
||
|
webhook_events_wiki_page_deleted: "Wiki page deleted"
|
||
|
webhook_url_info: "Redmine will send a POST request to this URL when one of the selected events in one of the selected projects occurs."
|
||
|
webhook_secret_info_html: "If set, Redmine will include an HMAC signature in the <code>X-Redmine-Signature-256</code> header."
|
||
|
permission_use_webhooks: "Use webhooks"
|
||
|
setting_webhooks_enabled: "Enable webhooks"
|
||
|
label_integrations: "Integrations"
|
||
| config/locales/de.yml (revision f9673061812c2f08e3775f61597c44826a430ea3) → config/locales/de.yml (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
text_default_active_job_queue_changed: Default queue adapter which is well suited
|
||
|
only for dev/test changed
|
||
|
twofa_already_setup: Two-factor authentication already set up
|
||
|
label_webhook_plural: "Webhooks"
|
||
|
label_webhook_new: "New webhook"
|
||
|
label_webhook_edit: "Edit webhook"
|
||
|
label_webhook_events: "Events"
|
||
|
webhook_events_issue: "Issues"
|
||
|
webhook_events_issue_created: "Issue created"
|
||
|
webhook_events_issue_updated: "Issue updated"
|
||
|
webhook_events_issue_closed: "Issue closed"
|
||
|
webhook_events_issue_deleted: "Issue deleted"
|
||
|
webhook_events_wiki_page: "Wiki pages"
|
||
|
webhook_events_wiki_page_created: "Wiki page created"
|
||
|
webhook_events_wiki_page_updated: "Wiki page updated"
|
||
|
webhook_events_wiki_page_deleted: "Wiki page deleted"
|
||
|
webhook_url_info: "Redmine will send a POST request to this URL when one of the selected events in one of the selected projects occurs."
|
||
|
webhook_secret_info_html: "If set, Redmine will include an HMAC signature in the <code>X-Redmine-Signature-256</code> header."
|
||
|
permission_use_webhooks: "Use webhooks"
|
||
|
setting_webhooks_enabled: "Enable webhooks"
|
||
|
label_integrations: "Integrations"
|
||
| config/locales/el.yml (revision f9673061812c2f08e3775f61597c44826a430ea3) → config/locales/el.yml (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
text_default_active_job_queue_changed: Default queue adapter which is well suited
|
||
|
only for dev/test changed
|
||
|
twofa_already_setup: Two-factor authentication already set up
|
||
|
label_webhook_plural: "Webhooks"
|
||
|
label_webhook_new: "New webhook"
|
||
|
label_webhook_edit: "Edit webhook"
|
||
|
label_webhook_events: "Events"
|
||
|
webhook_events_issue: "Issues"
|
||
|
webhook_events_issue_created: "Issue created"
|
||
|
webhook_events_issue_updated: "Issue updated"
|
||
|
webhook_events_issue_closed: "Issue closed"
|
||
|
webhook_events_issue_deleted: "Issue deleted"
|
||
|
webhook_events_wiki_page: "Wiki pages"
|
||
|
webhook_events_wiki_page_created: "Wiki page created"
|
||
|
webhook_events_wiki_page_updated: "Wiki page updated"
|
||
|
webhook_events_wiki_page_deleted: "Wiki page deleted"
|
||
|
webhook_url_info: "Redmine will send a POST request to this URL when one of the selected events in one of the selected projects occurs."
|
||
|
webhook_secret_info_html: "If set, Redmine will include an HMAC signature in the <code>X-Redmine-Signature-256</code> header."
|
||
|
permission_use_webhooks: "Use webhooks"
|
||
|
setting_webhooks_enabled: "Enable webhooks"
|
||
|
label_integrations: "Integrations"
|
||
| config/locales/en-GB.yml (revision f9673061812c2f08e3775f61597c44826a430ea3) → config/locales/en-GB.yml (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
text_default_active_job_queue_changed: Default queue adapter which is well suited
|
||
|
only for dev/test changed
|
||
|
twofa_already_setup: Two-factor authentication already set up
|
||
|
label_webhook_plural: "Webhooks"
|
||
|
label_webhook_new: "New webhook"
|
||
|
label_webhook_edit: "Edit webhook"
|
||
|
label_webhook_events: "Events"
|
||
|
webhook_events_issue: "Issues"
|
||
|
webhook_events_issue_created: "Issue created"
|
||
|
webhook_events_issue_updated: "Issue updated"
|
||
|
webhook_events_issue_closed: "Issue closed"
|
||
|
webhook_events_issue_deleted: "Issue deleted"
|
||
|
webhook_events_wiki_page: "Wiki pages"
|
||
|
webhook_events_wiki_page_created: "Wiki page created"
|
||
|
webhook_events_wiki_page_updated: "Wiki page updated"
|
||
|
webhook_events_wiki_page_deleted: "Wiki page deleted"
|
||
|
webhook_url_info: "Redmine will send a POST request to this URL when one of the selected events in one of the selected projects occurs."
|
||
|
webhook_secret_info_html: "If set, Redmine will include an HMAC signature in the <code>X-Redmine-Signature-256</code> header."
|
||
|
permission_use_webhooks: "Use webhooks"
|
||
|
setting_webhooks_enabled: "Enable webhooks"
|
||
|
label_integrations: "Integrations"
|
||
| config/locales/en.yml (revision f9673061812c2f08e3775f61597c44826a430ea3) → config/locales/en.yml (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
label_year: Year
|
||
|
label_month: Month
|
||
|
label_week: Week
|
||
|
label_webhook_plural: "Webhooks"
|
||
|
label_webhook_new: "New webhook"
|
||
|
label_webhook_edit: "Edit webhook"
|
||
|
label_webhook_events: "Events"
|
||
|
webhook_events_issue: "Issues"
|
||
|
webhook_events_issue_created: "Issue created"
|
||
|
webhook_events_issue_updated: "Issue updated"
|
||
|
webhook_events_issue_closed: "Issue closed"
|
||
|
webhook_events_issue_deleted: "Issue deleted"
|
||
|
webhook_events_wiki_page: "Wiki pages"
|
||
|
webhook_events_wiki_page_created: "Wiki page created"
|
||
|
webhook_events_wiki_page_updated: "Wiki page updated"
|
||
|
webhook_events_wiki_page_deleted: "Wiki page deleted"
|
||
|
webhook_url_info: "Redmine will send a POST request to this URL when one of the selected events in one of the selected projects occurs."
|
||
|
webhook_secret_info_html: "If set, Redmine will include an HMAC signature in the <code>X-Redmine-Signature-256</code> header."
|
||
|
permission_use_webhooks: "Use webhooks"
|
||
|
setting_webhooks_enabled: "Enable webhooks"
|
||
|
label_integrations: "Integrations"
|
||
|
label_date_from: From
|
||
|
label_date_to: To
|
||
|
label_language_based: Based on user's language
|
||
| config/locales/es-PA.yml (revision f9673061812c2f08e3775f61597c44826a430ea3) → config/locales/es-PA.yml (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
text_default_active_job_queue_changed: Default queue adapter which is well suited
|
||
|
only for dev/test changed
|
||
|
twofa_already_setup: Two-factor authentication already set up
|
||
|
label_webhook_plural: "Webhooks"
|
||
|
label_webhook_new: "New webhook"
|
||
|
label_webhook_edit: "Edit webhook"
|
||
|
label_webhook_events: "Events"
|
||
|
webhook_events_issue: "Issues"
|
||
|
webhook_events_issue_created: "Issue created"
|
||
|
webhook_events_issue_updated: "Issue updated"
|
||
|
webhook_events_issue_closed: "Issue closed"
|
||
|
webhook_events_issue_deleted: "Issue deleted"
|
||
|
webhook_events_wiki_page: "Wiki pages"
|
||
|
webhook_events_wiki_page_created: "Wiki page created"
|
||
|
webhook_events_wiki_page_updated: "Wiki page updated"
|
||
|
webhook_events_wiki_page_deleted: "Wiki page deleted"
|
||
|
webhook_url_info: "Redmine will send a POST request to this URL when one of the selected events in one of the selected projects occurs."
|
||
|
webhook_secret_info_html: "If set, Redmine will include an HMAC signature in the <code>X-Redmine-Signature-256</code> header."
|
||
|
permission_use_webhooks: "Use webhooks"
|
||
|
setting_webhooks_enabled: "Enable webhooks"
|
||
|
label_integrations: "Integrations"
|
||
| config/locales/es.yml (revision f9673061812c2f08e3775f61597c44826a430ea3) → config/locales/es.yml (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
text_default_active_job_queue_changed: Default queue adapter which is well suited
|
||
|
only for dev/test changed
|
||
|
twofa_already_setup: Two-factor authentication already set up
|
||
|
label_webhook_plural: "Webhooks"
|
||
|
label_webhook_new: "New webhook"
|
||
|
label_webhook_edit: "Edit webhook"
|
||
|
label_webhook_events: "Events"
|
||
|
webhook_events_issue: "Issues"
|
||
|
webhook_events_issue_created: "Issue created"
|
||
|
webhook_events_issue_updated: "Issue updated"
|
||
|
webhook_events_issue_closed: "Issue closed"
|
||
|
webhook_events_issue_deleted: "Issue deleted"
|
||
|
webhook_events_wiki_page: "Wiki pages"
|
||
|
webhook_events_wiki_page_created: "Wiki page created"
|
||
|
webhook_events_wiki_page_updated: "Wiki page updated"
|
||
|
webhook_events_wiki_page_deleted: "Wiki page deleted"
|
||
|
webhook_url_info: "Redmine will send a POST request to this URL when one of the selected events in one of the selected projects occurs."
|
||
|
webhook_secret_info_html: "If set, Redmine will include an HMAC signature in the <code>X-Redmine-Signature-256</code> header."
|
||
|
permission_use_webhooks: "Use webhooks"
|
||
|
setting_webhooks_enabled: "Enable webhooks"
|
||
|
label_integrations: "Integrations"
|
||
| config/locales/et.yml (revision f9673061812c2f08e3775f61597c44826a430ea3) → config/locales/et.yml (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
text_default_active_job_queue_changed: Default queue adapter which is well suited
|
||
|
only for dev/test changed
|
||
|
twofa_already_setup: Two-factor authentication already set up
|
||
|
label_webhook_plural: "Webhooks"
|
||
|
label_webhook_new: "New webhook"
|
||
|
label_webhook_edit: "Edit webhook"
|
||
|
label_webhook_events: "Events"
|
||
|
webhook_events_issue: "Issues"
|
||
|
webhook_events_issue_created: "Issue created"
|
||
|
webhook_events_issue_updated: "Issue updated"
|
||
|
webhook_events_issue_closed: "Issue closed"
|
||
|
webhook_events_issue_deleted: "Issue deleted"
|
||
|
webhook_events_wiki_page: "Wiki pages"
|
||
|
webhook_events_wiki_page_created: "Wiki page created"
|
||
|
webhook_events_wiki_page_updated: "Wiki page updated"
|
||
|
webhook_events_wiki_page_deleted: "Wiki page deleted"
|
||
|
webhook_url_info: "Redmine will send a POST request to this URL when one of the selected events in one of the selected projects occurs."
|
||
|
webhook_secret_info_html: "If set, Redmine will include an HMAC signature in the <code>X-Redmine-Signature-256</code> header."
|
||
|
permission_use_webhooks: "Use webhooks"
|
||
|
setting_webhooks_enabled: "Enable webhooks"
|
||
|
label_integrations: "Integrations"
|
||
| config/locales/eu.yml (revision f9673061812c2f08e3775f61597c44826a430ea3) → config/locales/eu.yml (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
text_default_active_job_queue_changed: Default queue adapter which is well suited
|
||
|
only for dev/test changed
|
||
|
twofa_already_setup: Two-factor authentication already set up
|
||
|
label_webhook_plural: "Webhooks"
|
||
|
label_webhook_new: "New webhook"
|
||
|
label_webhook_edit: "Edit webhook"
|
||
|
label_webhook_events: "Events"
|
||
|
webhook_events_issue: "Issues"
|
||
|
webhook_events_issue_created: "Issue created"
|
||
|
webhook_events_issue_updated: "Issue updated"
|
||
|
webhook_events_issue_closed: "Issue closed"
|
||
|
webhook_events_issue_deleted: "Issue deleted"
|
||
|
webhook_events_wiki_page: "Wiki pages"
|
||
|
webhook_events_wiki_page_created: "Wiki page created"
|
||
|
webhook_events_wiki_page_updated: "Wiki page updated"
|
||
|
webhook_events_wiki_page_deleted: "Wiki page deleted"
|
||
|
webhook_url_info: "Redmine will send a POST request to this URL when one of the selected events in one of the selected projects occurs."
|
||
|
webhook_secret_info_html: "If set, Redmine will include an HMAC signature in the <code>X-Redmine-Signature-256</code> header."
|
||
|
permission_use_webhooks: "Use webhooks"
|
||
|
setting_webhooks_enabled: "Enable webhooks"
|
||
|
label_integrations: "Integrations"
|
||
| config/locales/fa.yml (revision f9673061812c2f08e3775f61597c44826a430ea3) → config/locales/fa.yml (revision 833d7e3d85eb74ec9bc1d45a64a445f6c577a7da) | ||
|---|---|---|
|
field_name_or_email_or_login: نام، رایانامه یا شناسه کاربری
|
||
|
text_default_active_job_queue_changed: آداپتور پیشفرض صف که به شکل مناسبی کار میکند تنها برای توسعه/آزمون تغییر کرد
|
||
|
twofa_already_setup: Two-factor authentication already set up
|
||
|
label_webhook_plural: "Webhooks"
|
||
|
label_webhook_new: "New webhook"
|
||
|
label_webhook_edit: "Edit webhook"
|
||