Merge pull request #5310 from aignatov-bio/ai-sci-8327-add-webhook-menu-permission-check

Add webhook menu permission check [SCI-8327]
This commit is contained in:
aignatov-bio 2023-04-18 10:38:40 +02:00 committed by GitHub
commit 6ee87c72ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -69,11 +69,13 @@ class NavigationsController < ApplicationController
name: I18n.t('users.settings.sidebar.teams'), url: teams_path name: I18n.t('users.settings.sidebar.teams'), url: teams_path
}, { }, {
name: I18n.t('users.settings.sidebar.account_nav.addons'), url: addons_path name: I18n.t('users.settings.sidebar.account_nav.addons'), url: addons_path
}, {
name: I18n.t('users.settings.sidebar.webhooks'), url: users_settings_webhooks_path
} }
] ]
if can_create_acitivity_filters?
links.push({ name: I18n.t('users.settings.sidebar.webhooks'), url: users_settings_webhooks_path })
end
private_methods.select { |i| i.to_s[/^settings_menu_links_[a-z]*_extension$/] }.each do |method| private_methods.select { |i| i.to_s[/^settings_menu_links_[a-z]*_extension$/] }.each do |method|
links = __send__(method, links) links = __send__(method, links)
end end