mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-10 17:36:33 +08:00
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:
commit
6ee87c72ef
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue