mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 21:44:52 -04:00
Allow denying or shadow banning registrations via the spam checker (#8034)
This commit is contained in:
parent
e259d63f73
commit
3f91638da6
14 changed files with 258 additions and 18 deletions
|
@ -13,6 +13,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
import logging
|
||||
from enum import Enum
|
||||
|
||||
from twisted.internet import defer
|
||||
|
||||
|
@ -25,6 +26,16 @@ if MYPY:
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class RegistrationBehaviour(Enum):
|
||||
"""
|
||||
Enum to define whether a registration request should allowed, denied, or shadow-banned.
|
||||
"""
|
||||
|
||||
ALLOW = "allow"
|
||||
SHADOW_BAN = "shadow_ban"
|
||||
DENY = "deny"
|
||||
|
||||
|
||||
class SpamCheckerApi(object):
|
||||
"""A proxy object that gets passed to spam checkers so they can get
|
||||
access to rooms and other relevant information.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue