-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework the banning and unbanning of entities in PolicyLists. (#345)
* Rework the banning and unbanning of entities in PolicyLists. 1. We keep track of the event that created a list rule so that we can remove the rule by having a way to determine the original state key for the rule. This is because the state key of rules can be anything and should not be relied on by Mjolnir to unban things (which it was doing). 2. The old scheme for producing a state key was causing for some entities to escape bans #322. We could have used a hash or something similar, but we know that the reason for the `rule:${entity}` scheme existed was for ease of debugging and finding rules in devtools. So instead we have followed a scheme simalar to bridges where the first character of an mxid is replaced with an underscore. Everything else just gets put into the state key. Since domains can't have '@' and room ids, aliases can't either. 3. We have stopped the need for Mjolnir to wait for the next response from sync after banning, unbanning an entity so that we can apply ACL's sooner. * Use PolicyList's `banEntity` method to create imported rules.
- Loading branch information
Showing
6 changed files
with
116 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters