Basic FASP support (#34031)
This commit is contained in:
parent
e5fd61a84e
commit
97b9994743
45 changed files with 1423 additions and 1 deletions
|
@ -36,8 +36,8 @@ require_relative '../lib/paperclip/response_with_limit_adapter'
|
|||
require_relative '../lib/terrapin/multi_pipe_extensions'
|
||||
require_relative '../lib/mastodon/middleware/public_file_server'
|
||||
require_relative '../lib/mastodon/middleware/socket_cleanup'
|
||||
require_relative '../lib/mastodon/snowflake'
|
||||
require_relative '../lib/mastodon/feature'
|
||||
require_relative '../lib/mastodon/snowflake'
|
||||
require_relative '../lib/mastodon/version'
|
||||
require_relative '../lib/devise/strategies/two_factor_ldap_authenticatable'
|
||||
require_relative '../lib/devise/strategies/two_factor_pam_authenticatable'
|
||||
|
|
|
@ -479,6 +479,36 @@ en:
|
|||
new:
|
||||
title: Import domain blocks
|
||||
no_file: No file selected
|
||||
fasp:
|
||||
debug:
|
||||
callbacks:
|
||||
created_at: Created at
|
||||
delete: Delete
|
||||
ip: IP address
|
||||
request_body: Request body
|
||||
title: Debug Callbacks
|
||||
providers:
|
||||
active: Active
|
||||
base_url: Base URL
|
||||
callback: Callback
|
||||
delete: Delete
|
||||
edit: Edit Provider
|
||||
finish_registration: Finish registration
|
||||
name: Name
|
||||
providers: Providers
|
||||
public_key_fingerprint: Public key fingerprint
|
||||
registration_requested: Registration requested
|
||||
registrations:
|
||||
confirm: Confirm
|
||||
description: You received a registration from a FASP. Reject it if you did not initiate this. If you initiated this, carefully compare name and key fingerprint before confirming the registration.
|
||||
reject: Reject
|
||||
title: Confirm FASP Registration
|
||||
save: Save
|
||||
select_capabilities: Select Capabilities
|
||||
sign_in: Sign In
|
||||
status: Status
|
||||
title: Fediverse Auxiliary Service Providers
|
||||
title: FASP
|
||||
follow_recommendations:
|
||||
description_html: "<strong>Follow recommendations help new users quickly find interesting content</strong>. When a user has not interacted with others enough to form personalized follow recommendations, these accounts are recommended instead. They are re-calculated on a daily basis from a mix of accounts with the highest recent engagements and highest local follower counts for a given language."
|
||||
language: For language
|
||||
|
|
|
@ -73,6 +73,7 @@ SimpleNavigation::Configuration.run do |navigation|
|
|||
s.item :announcements, safe_join([material_symbol('campaign'), t('admin.announcements.title')]), admin_announcements_path, highlights_on: %r{/admin/announcements}, if: -> { current_user.can?(:manage_announcements) }
|
||||
s.item :custom_emojis, safe_join([material_symbol('mood'), t('admin.custom_emojis.title')]), admin_custom_emojis_path, highlights_on: %r{/admin/custom_emojis}, if: -> { current_user.can?(:manage_custom_emojis) }
|
||||
s.item :webhooks, safe_join([material_symbol('inbox'), t('admin.webhooks.title')]), admin_webhooks_path, highlights_on: %r{/admin/webhooks}, if: -> { current_user.can?(:manage_webhooks) }
|
||||
s.item :fasp, safe_join([material_symbol('extension'), t('admin.fasp.title')]), admin_fasp_providers_path, highlights_on: %r{/admin/fasp}, if: -> { current_user.can?(:manage_federation) } if Mastodon::Feature.fasp_enabled?
|
||||
s.item :relays, safe_join([material_symbol('captive_portal'), t('admin.relays.title')]), admin_relays_path, highlights_on: %r{/admin/relays}, if: -> { !limited_federation_mode? && current_user.can?(:manage_federation) }
|
||||
end
|
||||
|
||||
|
|
|
@ -196,6 +196,8 @@ Rails.application.routes.draw do
|
|||
|
||||
draw(:api)
|
||||
|
||||
draw(:fasp)
|
||||
|
||||
draw(:web_app)
|
||||
|
||||
get '/web/(*any)', to: redirect('/%{any}', status: 302), as: :web, defaults: { any: '' }, format: false
|
||||
|
|
29
config/routes/fasp.rb
Normal file
29
config/routes/fasp.rb
Normal file
|
@ -0,0 +1,29 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
namespace :api, format: false do
|
||||
namespace :fasp do
|
||||
namespace :debug do
|
||||
namespace :v0 do
|
||||
namespace :callback do
|
||||
resources :responses, only: [:create]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
resource :registration, only: [:create]
|
||||
end
|
||||
end
|
||||
|
||||
namespace :admin do
|
||||
namespace :fasp do
|
||||
namespace :debug do
|
||||
resources :callbacks, only: [:index, :destroy]
|
||||
end
|
||||
|
||||
resources :providers, only: [:index, :show, :edit, :update, :destroy] do
|
||||
resources :debug_calls, only: [:create]
|
||||
|
||||
resource :registration, only: [:new, :create]
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue