mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-09 06:04:46 +08:00
Add webhook menu permission check [SCI-8327]
This commit is contained in:
parent
ea4fe49699
commit
ad966c1608
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.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|
|
||||
links = __send__(method, links)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue