mirror of https://github.com/tootsuite/mastodon
Allow adding relays while secure mode & limited federation mode are enabled (#22324)
parent
7b68e6409b
commit
441cac758f
|
@ -3,7 +3,7 @@
|
|||
module Admin
|
||||
class RelaysController < BaseController
|
||||
before_action :set_relay, except: [:index, :new, :create]
|
||||
before_action :require_signatures_enabled!, only: [:new, :create, :enable]
|
||||
before_action :warn_signatures_not_enabled!, only: [:new, :create, :enable]
|
||||
|
||||
def index
|
||||
authorize :relay, :update?
|
||||
|
@ -56,8 +56,8 @@ module Admin
|
|||
params.require(:relay).permit(:inbox_url)
|
||||
end
|
||||
|
||||
def require_signatures_enabled!
|
||||
redirect_to admin_relays_path, alert: I18n.t('admin.relays.signatures_not_enabled') if authorized_fetch_mode?
|
||||
def warn_signatures_not_enabled!
|
||||
flash.now[:error] = I18n.t('admin.relays.signatures_not_enabled') if authorized_fetch_mode?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -557,7 +557,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 limited federation mode is enabled
|
||||
signatures_not_enabled: Relays may not work correctly while secure mode or limited federation mode is enabled
|
||||
status: Status
|
||||
title: Relays
|
||||
report_notes:
|
||||
|
|
Loading…
Reference in New Issue