aboutsummaryrefslogtreecommitdiff
path: root/docs/configuration
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2021-01-10 08:25:36 +0000
committerrinpatch <rinpatch@sdf.org>2021-01-10 08:25:36 +0000
commitad5338a79c32feaefb77ae3b62ab8e2dbcdd2d5e (patch)
treec56758cdaa95ce053e04952497386542e1b28531 /docs/configuration
parent5822338f3a42852c18a323c35041b14b29661de6 (diff)
parent6284e8f4b2e9b737d1ed256e89f2ac3ba673d6f8 (diff)
downloadpleroma-ad5338a79c32feaefb77ae3b62ab8e2dbcdd2d5e.tar.gz
Merge branch 'add_some_information_about_setting_up_a_development_environment' into 'develop'
Add some information about setting up a development environment Closes #1904 See merge request pleroma/pleroma!3207
Diffstat (limited to 'docs/configuration')
-rw-r--r--docs/configuration/mrf.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/configuration/mrf.md b/docs/configuration/mrf.md
index 31c66e098..9e8c0a2d7 100644
--- a/docs/configuration/mrf.md
+++ b/docs/configuration/mrf.md
@@ -133,3 +133,26 @@ config :pleroma, :mrf,
```
Please note that the Pleroma developers consider custom MRF policy modules to fall under the purview of the AGPL. As such, you are obligated to release the sources to your custom MRF policy modules upon request.
+
+### MRF policies descriptions
+
+If MRF policy depends on config, it can be added into MRF tab to adminFE by adding `config_description/0` method, which returns a map with a specific structure. See existing MRF's like `lib/pleroma/web/activity_pub/mrf/activity_expiration_policy.ex` for examples. Note that more complex inputs, like tuples or maps, may need extra changes in the adminFE and just adding it to `config_description/0` may not be enough to get these inputs working from the adminFE.
+
+Example:
+
+```elixir
+%{
+ key: :mrf_activity_expiration,
+ related_policy: "Pleroma.Web.ActivityPub.MRF.ActivityExpirationPolicy",
+ label: "MRF Activity Expiration Policy",
+ description: "Adds automatic expiration to all local activities",
+ children: [
+ %{
+ key: :days,
+ type: :integer,
+ description: "Default global expiration time for all local activities (in days)",
+ suggestions: [90, 365]
+ }
+ ]
+ }
+```