From 034d71ee38f0f61adaf90897d994aa24d724959c Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Thu, 8 Jun 2023 11:05:14 +0300 Subject: [PATCH] add matrix/m.policy.{server,user}/README.md --- matrix/m.policy.rule.server/README.md | 62 +++++++++++++++++++++++++++ matrix/m.policy.rule.user/README.md | 32 ++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 matrix/m.policy.rule.server/README.md create mode 100644 matrix/m.policy.rule.user/README.md diff --git a/matrix/m.policy.rule.server/README.md b/matrix/m.policy.rule.server/README.md new file mode 100644 index 0000000..ca4b4ae --- /dev/null +++ b/matrix/m.policy.rule.server/README.md @@ -0,0 +1,62 @@ +# `m.policy.rule.server` + +This event is the language of Draupnir/Mjolnir and experimental Mjolnir style ignore in Element Web labs when speaking of homeservers. + +TL;DR + +- Event type: `m.policy.rule.server` +- State key: `example.net` (server name goes here) + + + + + + +- [Allowing all servers](#allowing-all-servers) +- [Allowing server mjolnir.matrix.org](#allowing-server-mjolnirmatrixorg) +- [Banning evil example.org](#banning-evil-exampleorg) + + + + + +## Allowing all servers + +- Event type: `m.policy.rule.server` +- State key: `*` + +```json +{ + "entity": "*", + "reason": "Default ACL allow all", + "recommendation": "org.matrix.mjolnir.allow" +} +``` + +## Allowing server mjolnir.matrix.org + +- Event type: `m.policy.rule.server` +- State key: `mjolnir.matrix.org` + +```json +{ + "entity": "mjolnir.matrix.org", + "reason": "Mjolnir for all!", + "recommendation": "org.matrix.mjolnir.allow" +} +``` + +## Banning evil example.org + +_Well, the example organization domain is now evil :smirk_cat:_ + +- Event type: `m.policy.rule.server` +- State key: `example.org` + +```json +{ + "entity": "*", + "reason": "Evil example homeserver", + "recommendation": "m.ban" +} +``` diff --git a/matrix/m.policy.rule.user/README.md b/matrix/m.policy.rule.user/README.md new file mode 100644 index 0000000..03676fa --- /dev/null +++ b/matrix/m.policy.rule.user/README.md @@ -0,0 +1,32 @@ +# `m.policy.rule.user` + +This event is the language of Draupnir/Mjolnir and experimental Mjolnir style ignore in Element Web labs when speaking of individual users. + +TL;DR + +- Event type: `m.policy.rule.server` +- State key: `_username:example.net` (The leading`@` is replaced with an underscore `_`) + + + + + + +- [Banning an user](#banning-an-user) + + + + + +## Banning an user + +- Event type: `m.policy.rule.user` +- State key: `_username:example.net` + +```json +{ + "entity": "@username:example.net", + "reason": "Example ban", + "recommendation": "m.ban" +} +```