mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
email: Remove special integration doc behavior when gateway not set.
The current code looks like it's trying to redirect /integrations/doc/email
to /integrations when EMAIL_GATEWAY_PATTERN is not set.
I think it doesn't currently do this. The test for that pathway has a bug:
self.get_doc('integrations/doc-html/email', subdomain='zulip') needs a
leading slash, and putting the slash back in results in the test failing.
This redirection is not really desired behavior -- better is to
unconditionally show that the email integration exists, and just point the
user to https://zulip.readthedocs.io/en/latest/production/email-gateway.html
(this is done in a child commit).
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import os
|
||||
|
||||
from typing import Dict, List, Optional, Any
|
||||
from django.conf import settings
|
||||
from django.conf.urls import url
|
||||
from django.contrib.staticfiles.storage import staticfiles_storage
|
||||
from django.urls.resolvers import LocaleRegexProvider
|
||||
@@ -128,10 +127,6 @@ class BotIntegration(Integration):
|
||||
doc = self.DEFAULT_DOC_PATH.format(name=name)
|
||||
self.doc = doc
|
||||
|
||||
class EmailIntegration(Integration):
|
||||
def is_enabled(self) -> bool:
|
||||
return settings.EMAIL_GATEWAY_PATTERN != ""
|
||||
|
||||
class WebhookIntegration(Integration):
|
||||
DEFAULT_FUNCTION_PATH = 'zerver.webhooks.{name}.view.api_{name}_webhook'
|
||||
DEFAULT_URL = 'api/v1/external/{name}'
|
||||
@@ -354,8 +349,8 @@ INTEGRATIONS = {
|
||||
doc='zerver/integrations/codebase.md'),
|
||||
'discourse': Integration('discourse', 'discourse', ['communication'],
|
||||
doc='zerver/integrations/discourse.md'),
|
||||
'email': EmailIntegration('email', 'email', ['communication'],
|
||||
doc='zerver/integrations/email.md'),
|
||||
'email': Integration('email', 'email', ['communication'],
|
||||
doc='zerver/integrations/email.md'),
|
||||
'errbot': Integration('errbot', 'errbot', ['meta-integration', 'bots'],
|
||||
doc='zerver/integrations/errbot.md'),
|
||||
'git': Integration('git', 'git', ['version-control'],
|
||||
|
||||
Reference in New Issue
Block a user