diff options
author | Ilja <domainepublic@spectraltheorem.be> | 2020-12-26 11:35:05 +0100 |
---|---|---|
committer | Ilja <domainepublic@spectraltheorem.be> | 2020-12-26 11:35:05 +0100 |
commit | fd126f2616556a196f4d01748c7a0f4d07762327 (patch) | |
tree | ecfc53688c49ad0370eac3b83e608497ded80fcd /lib | |
parent | 6f9ee416d5bc446a8c0ca62fd7e904951f1c2f9e (diff) | |
download | pleroma-fd126f2616556a196f4d01748c7a0f4d07762327.tar.gz |
Make transparency_exclusions use tuples in admin-fe
* Make it use tuples
* I also changed the keys for key_placeholder and value_placeholder to use snake_case instead of camelCase
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/activity_pub/mrf.ex | 6 | ||||
-rw-r--r-- | lib/pleroma/web/activity_pub/mrf/keyword_policy.ex | 4 | ||||
-rw-r--r-- | lib/pleroma/web/activity_pub/mrf/simple_policy.ex | 40 |
3 files changed, 26 insertions, 24 deletions
diff --git a/lib/pleroma/web/activity_pub/mrf.ex b/lib/pleroma/web/activity_pub/mrf.ex index 13d592cec..a7c5d5510 100644 --- a/lib/pleroma/web/activity_pub/mrf.ex +++ b/lib/pleroma/web/activity_pub/mrf.ex @@ -31,9 +31,11 @@ defmodule Pleroma.Web.ActivityPub.MRF do %{ key: :transparency_exclusions, label: "MRF transparency exclusions", - type: {:list, :string}, + type: {:list, :tuple}, + key_placeholder: "instance", + value_placeholder: "reason", description: - "Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value.", + "Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value. You can also provide a reason for excluding these instance names. The instances and reasons won't be publicly disclosed.", suggestions: [ "exclusion.com" ] diff --git a/lib/pleroma/web/activity_pub/mrf/keyword_policy.ex b/lib/pleroma/web/activity_pub/mrf/keyword_policy.ex index cc57e11ca..8a8f20732 100644 --- a/lib/pleroma/web/activity_pub/mrf/keyword_policy.ex +++ b/lib/pleroma/web/activity_pub/mrf/keyword_policy.ex @@ -159,8 +159,8 @@ defmodule Pleroma.Web.ActivityPub.MRF.KeywordPolicy do %{ key: :replace, type: {:list, :tuple}, - keyPlaceholder: "pattern", - valuePlaceholder: "replacement", + key_placeholder: "instance", + value_placeholder: "reason", description: """ **Pattern**: a string or [Regex](https://hexdocs.pm/elixir/Regex.html) in the format of `~r/PATTERN/`. diff --git a/lib/pleroma/web/activity_pub/mrf/simple_policy.ex b/lib/pleroma/web/activity_pub/mrf/simple_policy.ex index d84c33864..de0904ad6 100644 --- a/lib/pleroma/web/activity_pub/mrf/simple_policy.ex +++ b/lib/pleroma/web/activity_pub/mrf/simple_policy.ex @@ -280,8 +280,8 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do %{ key: :media_removal, type: {:list, :tuple}, - keyPlaceholder: "instance", - valuePlaceholder: "reason", + key_placeholder: "instance", + value_placeholder: "reason", description: "List of instances to strip media attachments from and the reason for doing so", suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] @@ -290,8 +290,8 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do key: :media_nsfw, label: "Media NSFW", type: {:list, :tuple}, - keyPlaceholder: "instance", - valuePlaceholder: "reason", + key_placeholder: "instance", + value_placeholder: "reason", description: "List of instances to tag all media as NSFW (sensitive) from and the reason for doing so", suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] @@ -299,8 +299,8 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do %{ key: :federated_timeline_removal, type: {:list, :tuple}, - keyPlaceholder: "instance", - valuePlaceholder: "reason", + key_placeholder: "instance", + value_placeholder: "reason", description: "List of instances to remove from the Federated Timeline (aka The Whole Known Network) and the reason for doing so", suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] @@ -308,8 +308,8 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do %{ key: :reject, type: {:list, :tuple}, - keyPlaceholder: "instance", - valuePlaceholder: "reason", + key_placeholder: "instance", + value_placeholder: "reason", description: "List of instances to reject activities (except deletes) from and the reason for doing so", suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] @@ -317,8 +317,8 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do %{ key: :accept, type: {:list, :tuple}, - keyPlaceholder: "instance", - valuePlaceholder: "reason", + key_placeholder: "instance", + value_placeholder: "reason", description: "List of instances to only accept activities (except deletes) from and the reason for doing so", suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] @@ -326,8 +326,8 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do %{ key: :followers_only, type: {:list, :tuple}, - keyPlaceholder: "instance", - valuePlaceholder: "reason", + key_placeholder: "instance", + value_placeholder: "reason", description: "Force posts from the given instances to be visible by followers only and the reason for doing so", suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] @@ -335,32 +335,32 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do %{ key: :report_removal, type: {:list, :tuple}, - keyPlaceholder: "instance", - valuePlaceholder: "reason", + key_placeholder: "instance", + value_placeholder: "reason", description: "List of instances to reject reports from and the reason for doing so", suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] }, %{ key: :avatar_removal, type: {:list, :tuple}, - keyPlaceholder: "instance", - valuePlaceholder: "reason", + key_placeholder: "instance", + value_placeholder: "reason", description: "List of instances to strip avatars from and the reason for doing so", suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] }, %{ key: :banner_removal, type: {:list, :tuple}, - keyPlaceholder: "instance", - valuePlaceholder: "reason", + key_placeholder: "instance", + value_placeholder: "reason", description: "List of instances to strip banners from and the reason for doing so", suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] }, %{ key: :reject_deletes, type: {:list, :tuple}, - keyPlaceholder: "instance", - valuePlaceholder: "reason", + key_placeholder: "instance", + value_placeholder: "reason", description: "List of instances to reject deletions from and the reason for doing so", suggestions: [{"example.com", "Some reason"}, {"*.example.com", "Another reason"}] } |