Fix relays UI being available in whitelist/secure mode (#11963)
Fix relays UI referencing relay that is not functional
This commit is contained in:
parent
00d7bdcc2a
commit
add4d4118c
4 changed files with 10 additions and 7 deletions
|
@ -257,7 +257,7 @@ en:
|
|||
updated_msg: Emoji successfully updated!
|
||||
upload: Upload
|
||||
dashboard:
|
||||
authorized_fetch_mode: Authorized fetch mode
|
||||
authorized_fetch_mode: Secure mode
|
||||
backlog: backlogged jobs
|
||||
config: Configuration
|
||||
feature_deletions: Account deletions
|
||||
|
@ -383,6 +383,7 @@ en:
|
|||
pending: Waiting for relay's approval
|
||||
save_and_enable: Save and enable
|
||||
setup: Setup a relay connection
|
||||
signatures_not_enabled: Relays will not work correctly while secure mode or whitelist mode is enabled
|
||||
status: Status
|
||||
title: Relays
|
||||
report_notes:
|
||||
|
|
|
@ -47,7 +47,7 @@ SimpleNavigation::Configuration.run do |navigation|
|
|||
s.item :dashboard, safe_join([fa_icon('tachometer fw'), t('admin.dashboard.title')]), admin_dashboard_url
|
||||
s.item :settings, safe_join([fa_icon('cogs fw'), t('admin.settings.title')]), edit_admin_settings_url, if: -> { current_user.admin? }, highlights_on: %r{/admin/settings}
|
||||
s.item :custom_emojis, safe_join([fa_icon('smile-o fw'), t('admin.custom_emojis.title')]), admin_custom_emojis_url, highlights_on: %r{/admin/custom_emojis}
|
||||
s.item :relays, safe_join([fa_icon('exchange fw'), t('admin.relays.title')]), admin_relays_url, if: -> { current_user.admin? }, highlights_on: %r{/admin/relays}
|
||||
s.item :relays, safe_join([fa_icon('exchange fw'), t('admin.relays.title')]), admin_relays_url, if: -> { current_user.admin? && !whitelist_mode? }, highlights_on: %r{/admin/relays}
|
||||
s.item :sidekiq, safe_join([fa_icon('diamond fw'), 'Sidekiq']), sidekiq_url, link_html: { target: 'sidekiq' }, if: -> { current_user.admin? }
|
||||
s.item :pghero, safe_join([fa_icon('database fw'), 'PgHero']), pghero_url, link_html: { target: 'pghero' }, if: -> { current_user.admin? }
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue