mirror of
https://github.com/kikobar/mastodon.git
synced 2024-11-18 13:17:35 +00:00
Allow adding relays while secure mode & limited federation mode are enabled (#22324)
This commit is contained in:
parent
7b68e6409b
commit
441cac758f
|
@ -3,7 +3,7 @@
|
||||||
module Admin
|
module Admin
|
||||||
class RelaysController < BaseController
|
class RelaysController < BaseController
|
||||||
before_action :set_relay, except: [:index, :new, :create]
|
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
|
def index
|
||||||
authorize :relay, :update?
|
authorize :relay, :update?
|
||||||
|
@ -56,8 +56,8 @@ module Admin
|
||||||
params.require(:relay).permit(:inbox_url)
|
params.require(:relay).permit(:inbox_url)
|
||||||
end
|
end
|
||||||
|
|
||||||
def require_signatures_enabled!
|
def warn_signatures_not_enabled!
|
||||||
redirect_to admin_relays_path, alert: I18n.t('admin.relays.signatures_not_enabled') if authorized_fetch_mode?
|
flash.now[:error] = I18n.t('admin.relays.signatures_not_enabled') if authorized_fetch_mode?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -557,7 +557,7 @@ en:
|
||||||
pending: Waiting for relay's approval
|
pending: Waiting for relay's approval
|
||||||
save_and_enable: Save and enable
|
save_and_enable: Save and enable
|
||||||
setup: Setup a relay connection
|
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
|
status: Status
|
||||||
title: Relays
|
title: Relays
|
||||||
report_notes:
|
report_notes:
|
||||||
|
|
Loading…
Reference in a new issue