Files
archived-redmine-webhook/lib/redmine_webhook/projects_helper_patch.rb
2021-05-12 16:35:23 +05:00

19 lines
477 B
Ruby

module RedmineWebhook
module ProjectsHelperPatch
def project_settings_tabs
tabs = super
webhook_tab = {
:name => 'webhook',
:controller => 'webhook_settings',
:action => :show,
:partial => 'webhook_settings/show',
:label => :webhook
}
tabs << webhook_tab if User.current.allowed_to?(:manage_hook, @project)
tabs
end
end
end
ProjectsController.send(:helper, RedmineWebhook::ProjectsHelperPatch)