summaryrefslogtreecommitdiff
path: root/docs/configuration/mrf.md
diff options
context:
space:
mode:
authorIlja <pleroma@spectraltheorem.be>2021-01-10 08:25:36 +0000
committerrinpatch <rinpatch@sdf.org>2021-01-10 08:25:36 +0000
commit6284e8f4b2e9b737d1ed256e89f2ac3ba673d6f8 (patch)
treec56758cdaa95ce053e04952497386542e1b28531 /docs/configuration/mrf.md
parent5822338f3a42852c18a323c35041b14b29661de6 (diff)
downloadpleroma-6284e8f4b2e9b737d1ed256e89f2ac3ba673d6f8.tar.gz
pleroma-6284e8f4b2e9b737d1ed256e89f2ac3ba673d6f8.zip
Add development section
* I cretaed a folder 'development' * I split up the file dev.md into three parts and moved it to this folder * index.md * authentication_authorization.md * mrf.md * I also moved ap_extensions.md * I created a new file setting_up_pleroma_dev.md
Diffstat (limited to 'docs/configuration/mrf.md')
-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]
+ }
+ ]
+ }
+```