Skip to content

[engine] Toggle federation for tenant owners minds#4444

Ben requested to merge feat/toggle-fed-m4444 into master

Ticket(s) / Related Merge Requests

Summary of Changes

Add toggle for federation to tenant admin consoles.

Testing Considerations

Network: https://c81e728d9d4c2f636f067f89cc14862c.bens-networks-4.oke.minds.io

  • minds-runner-activitypub-entities will not process new posts when setting is off
  • minds-runner-activitypub-entities will process new posts when setting is on
  • minds-runner-activitypub-events will not process new events (upvotes) when setting is off
  • minds-runner-activitypub-events will process new events (upvotes) when setting is on
  • Hitting activitypub routes returns that federation is disabled when it it disabled (see curl command below)
  • Hitting activitypub routes returns that federation is disabled when it it disabled (see curl command below)
  • Can still curl to the non-tenant sandbox (curl https://feat-toggle-fed-m4444.oke.minds.io/api/activitypub/users/991441275603390467)
  • Networks WITHOUT custom domains cannot enable activitypub (Example subdomain suffix, d3d9446802a44259755d38e6d163e820, user root)
  • Networks WITHOUT custom domains can't have their activitypub endpoints hit
  • Runners won't federate for networks WITHOUT a custom domain

Useful curl command:

curl https://c81e728d9d4c2f636f067f89cc14862c.bens-networks-4.oke.minds.io/api/activitypub/users/1582087430272454659

Deployment Considerations

Make sure to run alter table statement from mysql provisioner.

ALTER TABLE `minds_tenant_configs`
    ADD federation_disabled boolean DEFAULT false
    AFTER color_scheme;

Regression Scope

ActivityPub and tenants.

Platform Affected (web, mobile, etc)

Web / ActivityPub.

Developer Testing Completed

Manual, unit (phpspec / karma / jasmine)

Screenshots / Screen Recording

minds-runner-activitypub-entities settings on vs off

simplescreenrecorder-2024-01-08_17.41.03

minds-runner-activitypub-events settings on vs off

simplescreenrecorder-2024-01-08_17.40.05

Manually hitting activitypub routes

simplescreenrecorder-2024-01-08_17.50.09

Curl non-tenant sandbox

image

Networks WITHOUT custom domains cannot enable activitypub

simplescreenrecorder-2024-01-08_18.00.47

Networks WITHOUT custom domains can't have their activitypub endpoints hit

image

Runners won't federate for networks WITHOUT a custom domain

simplescreenrecorder-2024-01-08_18.03.46

Does this impact

  • Localization
  • Dark/light mode
  • Guest mode

Definition of Done Checklist

  • The Acceptance Criteria has been met
  • Code is tested: Testing includes unit/spec, E2E/automated and manual testing
  • Merge requests description has been filled out
Edited by Ben

Merge request reports