Add an application setting to let user opt-in to ActivityPub features
Why are we doing this work
In &11247, we're implementing ActivityPub support into GitLab. This will spawn many MRs and we have to iron out the process, so we're putting it behind feature flags. Even so, some users may not want to allow ActivityPub support, for example institutional users.
For that reason, we need an application setting, allowing to opt-in ActivityPub features as a whole.
Relevant links
Non-functional requirements
-
Documentation: -
Testing:
Implementation plan
All ActivityPub endpoints are inheriting from the ActivityPub::ApplicationController
abstract controller, so that would be a good choice where to implement such check.
I'm not familiar yet with how application settings are implemented, so this is a very high level plan:
-
Figure out how application settings are implemented ( 😛 ) -
Add the toggle in settings -
Use the setting in ActivityPub features
Verification steps
- verify that the application setting is OFF by default
- turn the application setting ON
- use the verification steps of the releases actor and check endpoints are reachable
- turn the application setting OFF
- verify that the endpoints can't be reached anymore
Edited by kik